Function spin_sleep::sleep

source ·
pub fn sleep(duration: Duration)
Expand description

Puts the current thread to sleep for the duration less the default native accuracy. Then spins until the specified duration has elapsed.

Convenience function for SpinSleeper::default().sleep(duration). Can directly take the place of thread::sleep.