Enum amethyst::Stopwatch [] [src]

pub enum Stopwatch {
    Waiting,
    Started(DurationInstant),
    Ended(Duration),
}

A stopwatch which accurately measures elapsed time.

Variants

Initial state with an elapsed time value of 0 seconds.

Stopwatch has started counting the elapsed time since this Instant and accumuluated time from previous start/stop cycles Duration.

Stopwatch has been stopped and reports the elapsed time Duration.

Methods

impl Stopwatch
[src]

Creates a new stopwatch.

Retrieves the elapsed time.

Stops, resets, and starts the stopwatch again.

Starts, or resumes, measuring elapsed time. If the stopwatch has been started and stopped before, the new results are compounded onto the existing elapsed time value.

Note: Starting an already running stopwatch will do nothing.

Stops measuring elapsed time.

Note: Stopping a stopwatch that isn't running will do nothing.

Clears the current elapsed time value.

Trait Implementations

impl PartialEq for Stopwatch
[src]

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

This method tests for !=.

impl Eq for Stopwatch
[src]

impl Default for Stopwatch
[src]

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