Add AwakeIdleMeter, which reads the wall clock and time.monotonic() on each watchdog check. monotonic pauses during sleep on macOS (mach_absolute_time) and Linux (CLOCK_MONOTONIC), so the gap between the two clocks is time spent asleep, and that sleep is not charged as idle time until the agent records new activity. The cron inactivity watchdog and the turn liveness watchdog both use it, because on main both guard a cron run with a 600 s wall-clock bound. A job that is really idle for 600 s awake is still killed. Fixes #131523 (cherry picked from commit 07d9ddc24736e243d72327ff90a24f95e86119d8)
2 lines
10 B
Plaintext
2 lines
10 B
Plaintext
kohjunhao
|