[][src]Struct sched_clock::Duration

pub struct Duration(_);

Algebraic (signed) durations

Represents a span of wall-clock time, the difference between two instants. May be negative to represent going backwards in time.

Methods

impl Duration[src]

pub const NANOSECOND: Self[src]

One nanosecond, i.e. one billionth of a second

pub const MICROSECOND: Self[src]

One microsecond, i.e. one millionth of a second

pub const MILLISECOND: Self[src]

One millisecond, i.e. one thousandth of a second

pub const SECOND: Self[src]

One second

pub const MINUTE: Self[src]

One minute

pub const HOUR: Self[src]

One hour

pub const FOREVER: Self[src]

"Infinity" duration, as long as representable

pub const fn from_nanos(nanos: i64) -> Self[src]

Create a new Duration from a number of nanoseconds

pub const fn as_nanos(self) -> i64[src]

Turn into a number of signed integer nanoseconds

Trait Implementations

impl Default for Duration[src]

impl Clone for Duration[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Ord for Duration[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Eq for Duration[src]

impl Copy for Duration[src]

impl PartialOrd<Duration> for Duration[src]

impl PartialEq<Duration> for Duration[src]

impl Debug for Duration[src]

impl Add<Duration> for Instant[src]

type Output = Instant

The resulting type after applying the + operator.

impl Add<Duration> for Duration[src]

type Output = Duration

The resulting type after applying the + operator.

impl Sub<Duration> for Instant[src]

type Output = Instant

The resulting type after applying the - operator.

impl Sub<Duration> for Duration[src]

type Output = Duration

The resulting type after applying the - operator.

impl Mul<Duration> for i64[src]

type Output = Duration

The resulting type after applying the * operator.

impl Mul<i64> for Duration[src]

type Output = Duration

The resulting type after applying the * operator.

impl Div<i64> for Duration[src]

type Output = Duration

The resulting type after applying the / operator.

impl Neg for Duration[src]

type Output = Duration

The resulting type after applying the - operator.

impl AddAssign<Duration> for Instant[src]

impl AddAssign<Duration> for Duration[src]

impl SubAssign<Duration> for Duration[src]

impl SubAssign<Duration> for Instant[src]

impl MulAssign<i64> for Duration[src]

impl DivAssign<i64> for Duration[src]

impl Hash for Duration[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

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

Auto Trait Implementations

impl Send for Duration

impl Sync for Duration

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]