Skip to main content

interval

Function interval 

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

Run cb every period, drift-free (next fire = last scheduled fire + period, so slow frames skip beats instead of bunching). Dropping the handle stops the timer. Periods below 1ms are clamped to 1ms.