You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix timestamp calculations when RTC clock is corrected backwards
When the RTC drifts ahead and is corrected via clock sync, stored
timestamps can appear to be in the future, causing underflow in
"time ago" calculations (wrapping to ~4 billion seconds).
Changes:
- Add safeElapsedSecs() helper that clamps to 0 if timestamp > now
- Apply to neighbor "heard X ago" displays in simple_repeater
- Apply to UI time displays in companion_radio
- Apply to TimeSeriesData calculations in simple_sensor
- Switch BaseChatMesh connection expiry from RTC to millis()
The connection expiry change is the most important: using monotonic
time (millis) makes it immune to RTC adjustments from GPS, NTP, or
manual sync.
0 commit comments