* Fix for VolatileRTCClock wrapping around to initial synced time every 49 days

This commit is contained in:
Scott Powell 2025-10-30 16:45:50 +11:00
parent c4e99a841a
commit 3d9378d91e
8 changed files with 27 additions and 5 deletions

View file

@ -72,6 +72,11 @@ public:
*/
virtual void setCurrentTime(uint32_t time) = 0;
/**
* override in classes that need to periodically update internal state
*/
virtual void tick() { /* no op */}
uint32_t getCurrentTimeUnique() {
uint32_t t = getCurrentTime();
if (t <= last_unique) {