sleep

Function sleep 

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

Returns a future that completes after the specified duration.

This is the async equivalent of std::thread::sleep. The timer is managed by GCD and does not block any threads while waiting.

Note: The timer cannot be cancelled. If the Sleep future is dropped before completion, the underlying GCD timer still fires but does nothing.