Function time::early_sleep
source · pub fn early_sleep(duration: Duration)
Expand description
Wait for the given duration
.
This function spins the current task rather than sleeping it and so, when
possible, the sleep
crate should be used. However, unlike the sleep
crate, this function doesn’t rely on interrupts.
This function must not be called prior to registering an early sleeper using
register_early_sleeper
.