mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
in cpu_stat, only sleep when no tag
This commit is contained in:
@ -91,7 +91,7 @@ def cpu_load(tag=None):
|
|||||||
parts0 = _cpu_stats[tag]
|
parts0 = _cpu_stats[tag]
|
||||||
else:
|
else:
|
||||||
parts0 = _cpu_stat()
|
parts0 = _cpu_stat()
|
||||||
time.sleep(0.1)
|
time.sleep(0.1) # only need to sleep when no tag
|
||||||
parts1 = _cpu_stat()
|
parts1 = _cpu_stat()
|
||||||
if tag: _cpu_stats[tag] = parts1
|
if tag: _cpu_stats[tag] = parts1
|
||||||
|
|
||||||
@ -167,3 +167,4 @@ def reboot(mode=None):
|
|||||||
|
|
||||||
os.system("sync")
|
os.system("sync")
|
||||||
os.system("shutdown -r now")
|
os.system("shutdown -r now")
|
||||||
|
os.system("service pwnagotchi restart")
|
||||||
|
Reference in New Issue
Block a user