Struct coarsetime::Instant [] [src]

pub struct Instant(_);

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

Methods

impl Instant
[src]

[src]

Returns an instant corresponding to "now"

This function also updates the stored instant.

[src]

Returns an instant corresponding to the latest update

[src]

Update the stored instant

This function should be called frequently, for example in an event loop or using an Updater task.

[src]

Returns the amount of time elapsed from another instant to this one

[src]

Returns the amount of time elapsed between the this instant was created and the latest update

[src]

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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Instant
[src]

[src]

Formats the value using the given formatter.

impl Hash for Instant
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for Instant
[src]

[src]

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

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl Eq for Instant
[src]

impl PartialOrd for Instant
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

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

[src]

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

[src]

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]

[src]

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

[src]

This method tests for !=.

impl Default for Instant
[src]

[src]

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

impl Sub<Instant> for Instant
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Duration> for Instant
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl SubAssign<Duration> for Instant
[src]

[src]

Performs the -= operation.

impl Add<Duration> for Instant
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl AddAssign<Duration> for Instant
[src]

[src]

Performs the += operation.