oa::Stopwatch

Accumulating stopwatch. ⓘlet mut sw = oa::Stopwatch::new(); sw.start(); // ... work ... sw.stop(); println!("{:.3}ms", sw.elapsed_ms());

StRust public API

Declaration

pub struct Stopwatch { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn start(&mut self)
pub fn stop(&mut self)
pub fn reset(&mut self)
pub fn restart(&mut self)
pub fn elapsed(&self) -> Timestamp
pub fn elapsed_sec(&self) -> f64
pub fn elapsed_ms(&self) -> f64
pub fn is_running(&self) -> bool

Associated Functions

pub fn new() -> Self
fn default() -> Self

Public Method Documentation

pub fn start( &mut self )
No public source comment is attached to this declaration.
pub fn stop( &mut self )
No public source comment is attached to this declaration.
pub fn reset( &mut self )
No public source comment is attached to this declaration.
pub fn restart( &mut self )
No public source comment is attached to this declaration.
pub fn elapsed( &self ) -> Timestamp
No public source comment is attached to this declaration.
pub fn elapsed_sec( &self ) -> f64
No public source comment is attached to this declaration.
pub fn elapsed_ms( &self ) -> f64
No public source comment is attached to this declaration.
pub fn is_running( &self ) -> bool
No public source comment is attached to this declaration.
pub fn new() -> Self
No public source comment is attached to this declaration.
fn default() -> Self
No public source comment is attached to this declaration.