Function sleep_until

Source
pub fn sleep_until(instant: Instant)
Expand description

Puts the current thread to sleep until the deadline less the configured native accuracy. Then spins until the specified deadline is reached.

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