pub async fn sleep(&self, duration: Duration) {
        match &self.inner {
            #[cfg(feature = "tokio_executor")]
            TokioHandle(_) => {
                tokio::time::sleep(duration).await;
            },
            #[cfg(feature = "async_std_executor")]
            AsyncStdHandle => {
                async_std::task::sleep(duration).await;
            }, 
            #[cfg(feature = "smol_executor")]
            SmolHandle(_) => {
                async_io::Timer::after(duration).await;
            },
            #[cfg(feature = "futures_executor")]
            FuturesHandle(_) => {
                async_timer::new_timer(duration).await;
            },
            #[cfg(feature = "wasm_bindgen_executor")]
            WasmBindgenHandle => {
                WasmSleepFuture::new(duration).await;
            }
        }        
    }
/// Returns a future that sleeps for a duration.
Returns a future that sleeps for a duration.
Returns a future that sleeps for a duration .
pub async fn sleep(&self, duration: Duration) {
        match &self.inner {
            #[cfg(feature = "tokio_executor")]
            TokioHandle(_) => {
                tokio::time::sleep(duration).await;
            },
            #[cfg(feature = "async_std_executor")]
            AsyncStdHandle => {
                async_std::task::sleep(duration).await;
            }, 
            #[cfg(feature = "smol_executor")]
            SmolHandle(_) => {
                async_io::Timer::after(duration).await;
            },
            #[cfg(feature = "futures_executor")]
            FuturesHandle(_) => {
                async_timer::new_timer(duration).await;
            },
            #[cfg(feature = "wasm_bindgen_executor")]
            WasmBindgenHandle => {
                WasmSleepFuture::new(duration).await;
            }
        }        
    }
pub async fn sleep ( & self , duration : Duration ) { match & self . inner { # [ cfg ( feature " " ) ] TokioHandle ( _ ) => { tokio :: time :: sleep ( duration ) . await ; } , # [ cfg ( feature " " ) ] AsyncStdHandle => { async_std :: task :: sleep ( duration ) . await ; } , # [ cfg ( feature " " ) ] SmolHandle ( _ ) => { async_io :: Timer :: after ( duration ) . await ; } , # [ cfg ( feature " " ) ] FuturesHandle ( _ ) => { async_timer :: new_timer ( duration ) . await ; } , # [ cfg ( feature " " ) ] WasmBindgenHandle => { WasmSleepFuture :: new ( duration ) . await ; } } }
Returns a future that sleeps for a duration.
Returns a future that sleeps for a duration .
&self
duration
Duration