Struct spin_sleep::SpinSleeper [−][src]
pub struct SpinSleeper { /* fields omitted */ }
Expand description
Accuracy container for spin sleeping. See crate docs.
Implementations
Constructs new SpinSleeper with the input native sleep accuracy.
The lower the native_accuracy_ns
the more we effectively trust the accuracy of the
thread::sleep
function.
Returns configured native_accuracy_ns
Puts the current thread to sleep, if duration is long enough, then spins until the specified duration has elapsed.
Windows: Automatically selects the best native sleep accuracy generally achieving ~1ms native sleep accuracy, instead of default ~16ms.
Puts the current thread to sleep, if duration is long enough, then spins until the specified second duration has elapsed.
Windows: Automatically selects the best native sleep accuracy generally achieving ~1ms native sleep accuracy, instead of default ~16ms.
Puts the current thread to sleep, if duration is long enough, then spins until the specified nanosecond duration has elapsed.
Windows: Automatically selects the best native sleep accuracy generally achieving ~1ms native sleep accuracy, instead of default ~16ms.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SpinSleeper
impl Send for SpinSleeper
impl Sync for SpinSleeper
impl Unpin for SpinSleeper
impl UnwindSafe for SpinSleeper
Blanket Implementations
Mutably borrows from an owned value. Read more