1 2 3 4 5 6 7 8 9
//! Internal utilities /// Helper which wraps `tokio::time::interval` and makes it return a stream #[cfg(any(test, feature = "tokio-support"))] pub fn tokio_interval_stream( period: std::time::Duration, ) -> tokio_stream::wrappers::IntervalStream { tokio_stream::wrappers::IntervalStream::new(tokio::time::interval(period)) }