pub struct TimerOps;Expand description
TimerOps
Implementations§
Source§impl TimerOps
impl TimerOps
Sourcepub fn set(
delay: Duration,
label: impl Into<String>,
task: impl Future<Output = ()> + 'static,
) -> TimerId
pub fn set( delay: Duration, label: impl Into<String>, task: impl Future<Output = ()> + 'static, ) -> TimerId
Schedules a one-shot timer. The task is a single Future, consumed exactly once.