[][src]Struct microtime::MonotonicTime

pub struct MonotonicTime { /* fields omitted */ }

An instant in monotonic time as provided by a CLOCK_MONOTONIC like clock

Internally, this uses microsecond (usec) sized values to track, giving 584942417355.07202148 years until overflow. Internally, systemd uses the same formatting for it's time values.

Methods

impl MonotonicTime[src]

pub fn from_micros(usecs: u64) -> Self[src]

Create a timestamp from microseconds

pub fn as_micros(&self) -> u64[src]

Return the entire timestamp converted to microseconds

Trait Implementations

impl PartialOrd<MonotonicTime> for MonotonicTime[src]

impl PartialEq<MonotonicTime> for MonotonicTime[src]

impl Copy for MonotonicTime[src]

impl Ord for MonotonicTime[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 MonotonicTime[src]

impl From<MonotonicTime> for Duration[src]

Treat a duration as if it instead was a timestamp.

Sometimes, due to the lack of a way to generate a std::time::Instant from a numeric value, other code may use a Duration to contain a timestamp. In that case, you should use this function to obtain a MonotonicTime for the timestamp within the Duration

impl From<Duration> for MonotonicTime[src]

impl Clone for MonotonicTime[src]

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

Performs copy-assignment from source. Read more

impl Debug for MonotonicTime[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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]