pub trait TimerStrategy<S: Sleep> {
// Required methods
fn initial(&self) -> Instant;
fn sleep(&self, old: Instant, interval: Duration) -> Instant;
}
Expand description
A trait for timer strategies.
pub trait TimerStrategy<S: Sleep> {
// Required methods
fn initial(&self) -> Instant;
fn sleep(&self, old: Instant, interval: Duration) -> Instant;
}
A trait for timer strategies.