Skip to content

Commit

Permalink
athenad: move last_scan outside the loop (commaai#34099)
Browse files Browse the repository at this point in the history
move last_scan outside the loop
  • Loading branch information
deanlee authored Nov 27, 2024
1 parent b737e84 commit adb9560
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system/athena/athenad.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,9 @@ def log_handler(end_event: threading.Event) -> None:

def stat_handler(end_event: threading.Event) -> None:
STATS_DIR = Paths.stats_root()
last_scan = 0.0

while not end_event.is_set():
last_scan = 0.
curr_scan = time.monotonic()
try:
if curr_scan - last_scan > 10:
Expand Down

0 comments on commit adb9560

Please sign in to comment.