Flat directory/module structure

This commit is contained in:
David Peter authored and David Peter committed 2021-08-24 22:44:08 +02:00
1 parent d31936ec28
commit 30c381fe2a
27 files changed
+70 -71

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
mod internal;
pub mod wallclocktimer;
use cfg_if::cfg_if;
cfg_if! {
if #[cfg(windows)] {
mod windows_timer;
pub use self::windows_timer::get_cpu_timer;
} else {
mod unix_timer;
pub use self::unix_timer::get_cpu_timer;
}
}
use std::process::Child;
/// Defines start functionality of a timer.
pub trait TimerStart {
fn start() -> Self;
fn start_for_process(process: &Child) -> Self;
}
/// Defines stop functionality of a timer.
pub trait TimerStop {
type Result;
fn stop(&self) -> Self::Result;
}