Struct spin_sleep::SpinSleeper [] [src]

pub struct SpinSleeper { /* fields omitted */ }

Accuracy container for spin sleeping. See crate docs.

Methods

impl SpinSleeper
[src]

[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.

[src]

Returns configured native_accuracy_ns

[src]

Puts the current thread to sleep and then/or spins until the specified duration has elapsed.

[src]

Puts the current thread to sleep and then/or spins until the specified float second duration has elapsed.

[src]

Puts the current thread to sleep and then/or spins until the specified nanosecond duration has elapsed.

Trait Implementations

impl Debug for SpinSleeper
[src]

[src]

Formats the value using the given formatter.

impl Clone for SpinSleeper
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for SpinSleeper
[src]

impl PartialEq for SpinSleeper
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for SpinSleeper
[src]

impl Hash for SpinSleeper
[src]

[src]

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

1.3.0
[src]

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