Skip to main content

delay

Function delay 

Source
pub async fn delay(ms: u64)
Expand description

Asynchronously pauses the current task for a specified number of milliseconds.

§Arguments

  • ms - The number of milliseconds to pause the task.

§Examples

let _ = delay(100).await; // Pause for 100 milliseconds