Struct style::timer::Timer [] [src]

pub struct Timer { /* fields omitted */ }

A Timer struct that takes care of giving the current time for animations.

This is needed to be allowed to hook the time in the animations' test-mode.

Methods

impl Timer
[src]

[src]

Creates a new "normal" timer, i.e., a "Current" mode timer.

[src]

Creates a new "test mode" timer, with initial time 0.

[src]

Returns the current time, at least from the caller's perspective. In test mode returns whatever the value is.

[src]

Increments the current clock. Panics if the clock is not on test mode.

Trait Implementations

impl Clone for Timer
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Timer
[src]

[src]

Formats the value using the given formatter. Read more