pub fn sleep(duration: Duration) -> Result<(), RunState>
Blocks the current task by putting it to sleep for duration ticks.
duration
Returns the current task’s run state if it can’t be blocked.