Struct libpulse_binding::time::MonotonicTs[][src]

pub struct MonotonicTs(_);

A monotonic timestamp.

Implementations

impl MonotonicTs[src]

pub fn now() -> Self[src]

Gets the current monotonic system time in microseconds.

Note, if such a clock is not available then this will actually fall back to the wallclock time instead. No indication is available for whether or not this is the case, and the return value is still a MonotonicTs type.

pub fn is_valid(&self) -> bool[src]

Returns true so long as inner value is not MicroSeconds::INVALID.

pub fn checked_add(self, rhs: MicroSeconds) -> Option<Self>[src]

Checked integer addition. Computes self + rhs, returning None if overflow occurred, using the inner MicroSeconds’s checked_add() method.

pub fn checked_add_duration(self, rhs: Duration) -> Option<Self>[src]

Checked integer addition. Computes self + rhs, returning None if overflow occurred, using the inner integer’s checked_add() method.

pub fn checked_sub(self, rhs: MicroSeconds) -> Option<Self>[src]

Checked integer subtraction. Computes self - rhs, returning None if overflow occurred, using the inner MicroSeconds’s checked_sub() method.

pub fn checked_sub_duration(self, rhs: Duration) -> Option<Self>[src]

Checked integer subtraction. Computes self - rhs, returning None if overflow occurred, using the inner integer’s checked_sub() method.

Trait Implementations

impl Add<Duration> for MonotonicTs[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<MicroSeconds> for MonotonicTs[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Duration> for MonotonicTs[src]

impl AddAssign<MicroSeconds> for MonotonicTs[src]

impl Clone for MonotonicTs[src]

impl Copy for MonotonicTs[src]

impl Debug for MonotonicTs[src]

impl Default for MonotonicTs[src]

impl Display for MonotonicTs[src]

impl Eq for MonotonicTs[src]

impl Ord for MonotonicTs[src]

impl PartialEq<MonotonicTs> for MonotonicTs[src]

impl PartialOrd<MonotonicTs> for MonotonicTs[src]

impl StructuralEq for MonotonicTs[src]

impl StructuralPartialEq for MonotonicTs[src]

impl Sub<Duration> for MonotonicTs[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<MicroSeconds> for MonotonicTs[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Duration> for MonotonicTs[src]

impl SubAssign<MicroSeconds> for MonotonicTs[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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> ToString for T where
    T: Display + ?Sized
[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.