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
A Timer that ticks following the wall clock instead of the event loop's monotonic clock, for example to tick at the start of every minute, and that copes with the wall clock jumping or drifting.
#582 renames the current Timer to MonotonicTimer in v1.13.0, and v2.0.0 removes the deprecated name (#365), which frees Timer for this. Adding it isn't a breaking change, so it can come in any v2 minor, after v2.0.0.
Proposed solution
Start from the SDK's WallClockTimer, which the resampler already uses.
Code that still uses the deprecated 1.x Timer when upgrading should fail loudly rather than silently switch clocks, so the new Timer shouldn't accept the old Timer(interval, missed_tick_policy) call as it is.
Additional context
As I said in #365, once there is a wall clock timer, MonotonicTimer can probably lose features that only exist to build wall clock timers on top of it, like start_delay. Removing them is a breaking change, tracked in #581, together with tick_on_init, which could fit in this design too.
Activity
TimertoMonotonicTimer#582