Struct cap_std::time::Instant [−][src]
pub struct Instant { /* fields omitted */ }Expand description
A measurement of a monotonically nondecreasing clock.
This corresponds to std::time::Instant.
Note that this Instant has no now or elapsed methods. To obtain the
current time or measure the duration to the current time, you must first
obtain a MonotonicClock, and then call MonotonicClock::now or
MonotonicClock::elapsed instead.
Implementations
Constructs a new instance of Self from the given
std::time::Instant.
Returns the amount of time elapsed from another instant to this one.
This corresponds to std::time::Instant::duration_since.
Returns the amount of time elapsed from another instant to this one, or None if that instant is later than this one.
This corresponds to std::time::Instant::checked_duration_since.
Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.
This corresponds to std::time::Instant::saturating_duration_since.
Returns Some(t) where t is the time self + duration if t can be
represented as Instant (which means it’s inside the bounds of the
underlying data structure), None otherwise.
This corresponds to std::time::Instant::checked_add.
Returns Some(t) where t is the time self - duration if t can be
represented as Instant (which means it’s inside the bounds of the
underlying data structure), None otherwise.
This corresponds to std::time::Instant::checked_sub.
Trait Implementations
Performs the += operation. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Performs the -= operation. Read more
Auto Trait Implementations
impl RefUnwindSafe for Instant
impl UnwindSafe for Instant
Blanket Implementations
Mutably borrows from an owned value. Read more