Struct coarsetime::Instant
source · [−]pub struct Instant(_);Expand description
A measurement of a monotonically increasing clock. Opaque and useful only with Duration.
Implementations
Returns an instant corresponding to “now”
This function also updates the stored instant.
Update the stored instant
This function should be called frequently, for example in an event loop or using an
Updater task.
Returns the amount of time elapsed from another instant to this one
Returns the amount of time elapsed between the this instant was created and the latest update
Returns the amount of time elapsed since this instant was created
This function also updates the stored instant.
Return a representation of this instant as a number of “ticks”.
Note that length of a ‘tick’ is not guaranteed to represent
the same amount of time across different platforms, or from
one version of coarsetime to another.
Note also that the instant represented by “0” ticks is
unspecified. It is not guaranteed to be the same time across
different platforms, or from one version of coarsetime to
another.
This API is mainly intended for applications that need to
store the value of an Instant in an
AtomicU64.
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