diff --git a/Cargo.lock b/Cargo.lock index eb81506..0a06e03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,7 +239,6 @@ dependencies = [ "approx", "assert_cmd", "atty", - "cfg-if", "clap", "colored", "csv", diff --git a/Cargo.toml b/Cargo.toml index 7c1ff70..7393e08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,6 @@ colored = "2.0" indicatif = "0.16" statistical = "1.0" atty = "0.2" -cfg-if = "1.0" csv = "1.1.6" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/src/timer/mod.rs b/src/timer/mod.rs index 68e0ef7..0ef1d38 100644 --- a/src/timer/mod.rs +++ b/src/timer/mod.rs @@ -1,19 +1,17 @@ -mod internal; +use std::process::Child; +mod internal; pub mod wallclocktimer; -use cfg_if::cfg_if; +#[cfg(windows)] +mod windows_timer; +#[cfg(windows)] +pub use self::windows_timer::get_cpu_timer; -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; +#[cfg(not(windows))] +mod unix_timer; +#[cfg(not(windows))] +pub use self::unix_timer::get_cpu_timer; /// Defines start functionality of a timer. pub trait TimerStart {