observe CPU instead of sleep

This commit is contained in:
barry committed 2025-01-18 23:44:49 +01:00
1 parent 80702e1e4f
commit a865d2df9b
1 file changed
+1 -2
+1 -2
View File
@@ -34,7 +34,7 @@ def get_cpu_temp():
def get_cpu_util():
try:
return psutil.cpu_percent(interval=0)
return psutil.cpu_percent(interval=0.1)
except Exception as e:
warnings.warn(f"Error getting CPU util: {e}")
return None
@@ -215,7 +215,6 @@ def display_loop(api: Api, cfg: Dict):
draw.text((date_x, 78), date_text, font=Font2, fill=(255, 255, 255))
d.ShowImage(not_playing_img)
time.sleep(0.1)
if current_mode != 0:
current_mode = 0
print("Standby mode")