mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 09:01:25 +00:00
Fix non-windows build
This commit is contained in:
1 parent
369f466716
commit
940732947c
2 files changed
+5
-3
No files matched your search
@@ -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)?;
|
||||
|
||||
|
||||
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user