observe CPU instead of sleep
This commit is contained in:
parent
80702e1e4f
commit
a865d2df9b
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user