set_interval

Function set_interval 

Source
pub fn set_interval<F, Fut>(
    interval: Duration,
    label: impl Into<String>,
    task: F,
) -> ApiTimerHandle
where F: FnMut() -> Fut + 'static, Fut: Future<Output = ()> + 'static,
Expand description

Schedule a repeating timer. Task produces a fresh Future on each tick.