Struct amethyst_engine::Stopwatch
[−]
[src]
pub struct Stopwatch { /* fields omitted */ }
Useful utility for accurately measuring elapsed time.
Methods
impl Stopwatch
[src]
fn new() -> Stopwatch
fn elapsed(&self) -> Duration
Retrieves the elapsed time.
fn restart(&mut self)
Stops, resets, and starts the stopwatch again.
fn start(&mut self)
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.
fn stop(&mut self)
Stops measuring elapsed time.
Note: Stopping a stopwatch that isn't running will do nothing.
fn reset(&mut self)
Clears the current elapsed time value.