mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
fix: using /proc/uptime to correctly calculate uptime in seconds (fixes #264)
This commit is contained in:
@ -17,6 +17,11 @@ def name():
|
||||
return _name
|
||||
|
||||
|
||||
def uptime():
|
||||
with open('/proc/uptime') as fp:
|
||||
return int(fp.read().split('.')[0])
|
||||
|
||||
|
||||
def mem_usage():
|
||||
out = subprocess.getoutput("free -m")
|
||||
for line in out.split("\n"):
|
||||
|
Reference in New Issue
Block a user