mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-08-22 02:48:15 +00:00
fix(vegas): use a monotonic clock for the frame-rate timers
Self-review catch. The heartbeat added in this PR compared wall-clock timestamps, which is the defect CodeRabbit flagged on the metrics throttle and which I had already fixed there: these devices have no RTC, so the clock jumps by however wrong boot time was when NTP first syncs. A backward jump would suppress the heartbeat, a forward one fire it early. The same value also divides the frame count to produce the frame rate, so a jump corrupted the reported fps as well -- a pre-existing problem this makes worth fixing rather than working around. last_fps_log_time was seeded from start_time, which is wall clock and is used further down to report the iteration duration. Switching only the reads would have made every delta hugely negative and silenced frame-rate reporting completely, so the seed moves to time.monotonic() and start_time is left alone for the duration reporting it exists for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
This commit is contained in:
co-authored by
Claude Opus 5
parent
a4290e8a28
commit
36c420c872
Binary file not shown.
|
After Width: | Height: | Size: 467 B |
Reference in New Issue
Block a user