This commit is contained in:
2025-06-17 19:53:17 -04:00
parent 8ae4c81f06
commit 02f7ef6de5

15
src/mem.py Normal file
View File

@ -0,0 +1,15 @@
import psutil
import math
peak: float = 0
check: int = 3600 # Seconds
def usage() -> float:
global peak
mem = round(psutil.virtual_memory().used / 1048576000, 1)
if mem > peak:
peak = mem
return mem
def total() -> int:
return math.floor(psutil.virtual_memory().total / 1048576000)