pub enum MissedTickBehavior {
Burst,
Skip,
Delay,
}Expand description
Configures how DtactInterval::tick catches up after missing one
or more ticks.
A tick is “missed” when the interval isn’t polled promptly enough —
e.g. the caller was busy doing other work. Mirrors
tokio::time::MissedTickBehavior.
Variants§
Burst
Fire every missed tick back-to-back with no delay between them
until caught up, then resume the original cadence. next always
advances by exactly one period per tick() call, so a caller
that fell behind sees a burst of immediately-ready tick()
calls rather than any ticks being silently dropped. The default,
matching tokio::time::MissedTickBehavior’s own default.
Skip
Skip every missed tick: the next scheduled time jumps straight to the next period boundary that’s still in the future, rather than firing once for each one that was missed.
Delay
Reset the schedule relative to when the late tick actually fired,
not the original cadence — the next tick is period after now,
not after the missed tick’s originally-scheduled time.
Trait Implementations§
Source§impl Clone for MissedTickBehavior
impl Clone for MissedTickBehavior
Source§fn clone(&self) -> MissedTickBehavior
fn clone(&self) -> MissedTickBehavior
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more