Skip to main content

sleep

Function sleep 

Source
pub fn sleep(duration: Duration) -> Sleep ⓘ
Expand description

Waits until duration has passed.

The wait is at least duration, rounded up to the timer wheel’s millisecond; a busy shard may let it run later by the time its current task takes to yield. sleep_precise waits to the microsecond instead.