Made it less annoying. xD

This commit is contained in:
The Wobbler 2023-12-28 20:10:47 +01:00
parent 43d9a4c3ec
commit 35615caa70

View file

@ -58,6 +58,8 @@ def ram_full():
def loop(): def loop():
warning_cooldown = 0
while True: while True:
ram_usage = ram_perc() ram_usage = ram_perc()
swap_usage = swap_perc() swap_usage = swap_perc()
@ -65,8 +67,14 @@ def loop():
if ram_usage >= 98 and swap_usage >= 98: if ram_usage >= 98 and swap_usage >= 98:
ram_full() ram_full()
elif ram_usage >= 90: elif ram_usage >= 90 = warning_cooldown == 0:
ram_almost_full() ram_almost_full()
warning_cooldown = 30
else:
warning_cooldown -= 1
sleep(1)
if __name__ == "__main__": if __name__ == "__main__":