Skip to main content

sleep

Function sleep 

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

Sleep for the given duration.

§Example

use std::time::Duration;
moduvex_runtime::block_on(async {
    moduvex_runtime::sleep(Duration::from_millis(100)).await;
});