Struct spin_sleep::SpinSleeper[][src]

pub struct SpinSleeper { /* fields omitted */ }

Accuracy container for spin sleeping. See crate docs.

Methods

impl SpinSleeper
[src]

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

impl Debug for SpinSleeper
[src]

Formats the value using the given formatter. Read more

impl Clone for SpinSleeper
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for SpinSleeper
[src]

impl PartialEq for SpinSleeper
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for SpinSleeper
[src]

impl Hash for SpinSleeper
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Default for SpinSleeper
[src]

Constructs new SpinSleeper with defaults suiting the current OS

Auto Trait Implementations

impl Send for SpinSleeper

impl Sync for SpinSleeper