Function sleep::sleep

source ·
pub fn sleep(duration: Duration) -> Result<(), RunState>
Expand description

Blocks the current task by putting it to sleep for duration ticks.

Returns the current task’s run state if it can’t be blocked.