pub fn sleep<T: Into<Millis>>(dur: T) -> Sleep ⓘ
Expand description
Waits until duration
has elapsed.
No work is performed while awaiting on the sleep future to complete. Sleep
operates at 16 millisecond granularity and should not be used for tasks that
require high-resolution timers. Sleep
sleeps at least one tick (16 millis)
even if 0 millis duration is used.