Skip to main content

interval

Function interval 

Source
pub fn interval(period: Duration) -> Interval
Expand description

Create an Interval that fires the first tick immediately and then every period.

The first tick is queued as soon as the background thread starts, so it is available almost immediately after this function returns.

ยงPanics

Panics if the OS fails to spawn the background tick thread (extremely rare).