Function spin_sleep::native_sleep
source · pub fn native_sleep(duration: Duration)
Expand description
Asks the OS to put the current thread to sleep for at least the specified amount of time. Does not spin.
Equivalent to std::thread::sleep
, with the following exceptions:
- Windows: Automatically selects the best native sleep accuracy generally achieving ~1ms native sleep accuracy, instead of default ~16ms.