Skip to main content

interval

Function interval 

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

Stream + tick-future hybrid that yields every period, with the first item delivered immediately. Matches tokio::time::interval ergonomically (.tick().await -> Instant) AND exposes Stream<Item = ()> for callers that prefer that shape.