/// Create a new timeout future.
///
/// Remember that futures do nothing unless polled or spawned, so either
/// pass this future to `wasm_bindgen_futures::spawn_local` or use it inside
/// another future.
///
/// # Example
///
/// ```no_run
/// use gloo_timers::future::TimeoutFuture;
/// use wasm_bindgen_futures::spawn_local;
///
/// spawn_local(async {
///     TimeoutFuture::new(1_000).await;
///     // Do stuff after one second...
/// });
/// ```

Create a new timeout future.
Remember that futures do nothing unless polled or spawned, so either
pass this future to `wasm_bindgen_futures::spawn_local` or use it inside
another future.
Create a new timeout future . Remember that futures do nothing unless polled or spawned so either pass this future to ` wasm_bindgen_futures :: spawn_local ` or use it inside another future .
pub fn new(millis: u32) -> TimeoutFuture {
        let (tx, rx) = oneshot::channel();
        let inner = Timeout::new(millis, move || {
            // if the receiver was dropped we do nothing.
            tx.send(()).unwrap_throw();
        });
        TimeoutFuture { inner, rx }
    }
pub fn new ( millis : u32 ) -> TimeoutFuture { let ( tx , rx ) = oneshot :: channel ( ) ; let inner = Timeout :: new ( millis , move | | { // if the receiver was dropped we do nothing.
 tx . send ( ( ) ) . unwrap_throw ( ) ; } ) ; TimeoutFuture { inner , rx } }
Create a new timeout future.
Create a new timeout future .
millis
u32
example

```no_run
use gloo_timers::future::TimeoutFuture;
use wasm_bindgen_futures::spawn_local.

spawn_local(async {
TimeoutFuture::new(1_000).await;
Do stuff after one second
});
```
` ` ` no_run use gloo_timers :: future :: TimeoutFuture ; use wasm_bindgen_futures :: spawn_local . spawn_local ( async { TimeoutFuture :: new ( 1_000 ) . await ; Do stuff after one second } ) ; ` ` `