pub trait Timer {
// Provided methods
fn start(&mut self, _: &'static str) { ... }
fn stop(&mut self, _: &'static str) { ... }
fn elapsed(&self, _: &'static str) -> Option<Duration> { ... }
}
Provided Methods§
Sourcefn start(&mut self, _: &'static str)
fn start(&mut self, _: &'static str)
Creates or updates a timer with the provided name. The same timer can be started and stopped as many times as needed, and will keep track of the sum of all the time spent
Sourcefn stop(&mut self, _: &'static str)
fn stop(&mut self, _: &'static str)
Stops the timer with the provided name. The timer must already exist, or this call will panic. The same timer can be started and stopped as many times as needed, and will keep track of the sum of all the intervals