2018-02-05 18:22:59 -05:00
|
|
|
mod internal;
|
|
|
|
|
|
2018-02-02 17:28:52 +01:00
|
|
|
pub mod wallclocktimer;
|
2018-02-05 18:22:59 -05:00
|
|
|
|
|
|
|
|
#[cfg(not(windows))]
|
|
|
|
|
pub mod unix_timer;
|
|
|
|
|
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
|
pub mod windows_timer;
|
2018-02-02 17:28:52 +01:00
|
|
|
|
|
|
|
|
/// Defines a general timer with start/stop functionality.
|
|
|
|
|
pub trait Timer {
|
|
|
|
|
type Result;
|
|
|
|
|
|
|
|
|
|
fn start() -> Self;
|
|
|
|
|
fn stop(&self) -> Self::Result;
|
|
|
|
|
}
|