pub struct MinTimerKey { /* private fields */ }
Expand description
Timer key for a Min timer
Used by the timer_min!
macro and the timer_min_*
methods in
Core
. It can be used to delete a timer or change its expiry
time. It is plain Copy
data, 8 bytes long. Note that the key
should only be used on this same Stakker instance. If it is
used on another then it might cause a panic.
A “min” timer is intended for use where the end-time is an estimate and where that estimate is progressively improved over time. The end-time is approached asymptotically to allow wiggle-room without having to update the underlying timer too many times, e.g. a 60s timer uses 5 timers in sequence, adjusting as it goes according to the latest estimate: ~15s before, ~4s before, ~1s before, ~0.125s before, then end-time itself. So for example in the first 45s, the timer can accomodate up to 15s of change in the end-time without having to delete a timer.
Trait Implementations§
Source§impl Clone for MinTimerKey
impl Clone for MinTimerKey
Source§fn clone(&self) -> MinTimerKey
fn clone(&self) -> MinTimerKey
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more