Skip to main content

sleep

Function sleep 

Source
pub fn sleep(duration: Duration)
Expand description

Suspends the current thread until at least duration has elapsed.

Simulation advances to the earliest timer only when every application task is blocked; it never sleeps an OS thread.