Fix non-windows build

This commit is contained in:
Steve Pentland authored and sharkdp committed 2018-02-13 21:02:32 +01:00
1 parent 369f466716
commit 940732947c
2 files changed
+5 -3

No files matched your search

+2 -2
View File
@@ -320,9 +320,9 @@ fn execute_and_time(command: &str) -> io::Result<ExecuteResult> {
#[cfg(not(windows))]
fn execute_and_time(command: &str) -> io::Result<ExecuteResult> {
use hyperfine::timer::cputimer::CPUTimer;
use hyperfine::timer::unix_timer::UnixCPUTimer;
let cpu_timer = CPUTimer::start();
let cpu_timer = UnixCPUTimer::start();
let status = run_shell_command(command)?;
+3 -1
View File
@@ -2,7 +2,9 @@
use super::internal::{CPUInterval, CPUTimes};
use hyperfine::timer::Timer;
use hyperfine::internal::Second;
use std::mem;
pub struct UnixCPUTimer {
start_cpu: CPUTimes,
@@ -12,7 +14,7 @@ impl Timer for UnixCPUTimer {
type Result = (Second, Second);
fn start() -> Self {
CPUTimer {
UnixCPUTimer {
start_cpu: get_cpu_times(),
}
}