Skip to main content

sleep

Function sleep 

Source
pub async fn sleep(duration: Duration)
Expand description

Sleep for a duration.

  • Native: tokio::time::sleep.
  • WASM: gloo_timers::future::sleep (backed by JS setTimeout).