pub fn new(millis: u32) -> IntervalStream {
        let (sender, receiver) = mpsc::unbounded();
        let inner = Interval::new(millis, move || {
            // if the receiver was dropped we do nothing.
            sender.unbounded_send(()).unwrap_throw();
        });

        IntervalStream { receiver, inner }
    }
/// Create a new interval stream.
///
/// Remember that streams do nothing unless polled or spawned, so either
/// spawn this stream via `wasm_bindgen_futures::spawn_local` or use it inside
/// another stream or future.
///
/// # Example
///
/// ```no_run
/// use futures_util::stream::StreamExt;
/// use gloo_timers::future::IntervalStream;
/// use wasm_bindgen_futures::spawn_local;
///
/// spawn_local(async {
///     IntervalStream::new(1_000).for_each(|_| {
///         // Do stuff every one second...
///     }).await;
/// });
/// ```

Create a new interval stream.
Remember that streams do nothing unless polled or spawned, so either
spawn this stream via `wasm_bindgen_futures::spawn_local` or use it inside
another stream or future.
Create a new interval stream . Remember that streams do nothing unless polled or spawned so either spawn this stream via ` wasm_bindgen_futures :: spawn_local ` or use it inside another stream or future .
pub fn new(millis: u32) -> IntervalStream {
        let (sender, receiver) = mpsc::unbounded();
        let inner = Interval::new(millis, move || {
            // if the receiver was dropped we do nothing.
            sender.unbounded_send(()).unwrap_throw();
        });
        IntervalStream { receiver, inner }
    }
pub fn new ( millis : u32 ) -> IntervalStream { let ( sender , receiver ) = mpsc :: unbounded ( ) ; let inner = Interval :: new ( millis , move | | { // if the receiver was dropped we do nothing.
 sender . unbounded_send ( ( ) ) . unwrap_throw ( ) ; } ) ; IntervalStream { receiver , inner } }
Create a new interval stream.
Create a new interval stream .
millis
u32
millis
u32
example



spawn_local(async {
IntervalStream::new(1_000).for_each(|_| {
Do stuff every one second
}).await;
});
```
spawn_local ( async { IntervalStream :: new ( 1_000 ) . for_each ( |_| { Do stuff every one second } ) . await ; } ) ; ` ` `