pub fn interval(duration: Duration) -> impl Stream<Item = ()> + Unpin
Creates a stream that returns a new value every duration.
duration