pub struct Timer { /* private fields */ }
Expand description

A timer that does not trigger an update in a timer list. These are usually owned by individual components and needs to be explicitly polled.

Note: The timer doesn’t implement Copy to ensure it isn’t accidentally moved and have the expiration discarded.

Implementations

Sets the timer to expire at the given timestamp

Cancels the timer. After cancellation, a timer will no longer report as expired.

Returns true if the timer has expired

Returns true if the timer is armed

Notifies the timer of the current time. If the timer’s expiration occurs before the current time, it will be cancelled. The method returns whether the timer was expired and had been cancelled.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

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

This method tests for !=.

Notifies the query of any timers owned by the provider Read more

Returns the next Timestamp at which the earliest timer is armed in the provider

Returns true if there are any timers armed

Counts the number of armed timers in the provider

Iterates over each timer in the provider and calls the provided function

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.