Struct timer_controller::Timer [] [src]

pub struct Timer {
    pub interval: f64,
    pub time: f64,
    pub next: f64,
}

A timer relative to start of program.

Fields

The interval in seconds between each trigger.

The time in seconds from start of program.

The time of next trigger in seconds.

Methods

impl Timer
[src]

[src]

Creates a new timer.

[src]

Calls closure for each interval to catch up with update time.

The timing is inaccurate for less intervals than the update interval.