Skip to main content

interval_n

Function interval_n 

Source
pub fn interval_n(
    period: Duration,
    times: u32,
    cb: impl FnMut() + 'static,
) -> TimerHandle
Expand description

Like interval, but stops on its own after times firings. A 0 count schedules nothing and returns a disarmed handle.