Struct coarsetime::Instant [] [src]

pub struct Instant(_);

A measurement of a monotonically increasing clock. Opaque and useful only with Duration.

Methods

impl Instant
[src]

Returns an instant corresponding to "now"

This function also updates the stored instant.

Returns an instant corresponding to the latest update

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.

Trait Implementations

impl Copy for Instant
[src]

impl Clone for Instant
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Instant
[src]

Formats the value using the given formatter.

impl Hash for Instant
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl Ord for Instant
[src]

This method returns an Ordering between self and other. Read more

impl Eq for Instant
[src]

impl PartialOrd for Instant
[src]

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq for Instant
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for Instant
[src]

Returns the "default value" for a type. Read more

impl Sub<Instant> for Instant
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<Duration> for Instant
[src]

The resulting type after applying the - operator

The method for the - operator

impl SubAssign<Duration> for Instant
[src]

The method for the -= operator

impl Add<Duration> for Instant
[src]

The resulting type after applying the + operator

The method for the + operator

impl AddAssign<Duration> for Instant
[src]

The method for the += operator