Exclude entire cputime file, force basic output

This commit is contained in:
Steve Pentland authored and David Peter committed 2018-02-02 22:42:53 +01:00
1 parent 1ddf729c7a
commit ff798ad615
3 files changed
+10 -4

No files matched your search

+4 -4
View File
@@ -100,8 +100,8 @@ pub fn time_shell_command(
) -> io::Result<(TimingResult, bool)> {
let start = Instant::now();
let status = Command::new("sh")
.arg("-c")
let status = Command::new("cmd")
// .arg("-c")
.arg(shell_cmd)
.stdin(Stdio::null())
.stdout(Stdio::null())
@@ -129,8 +129,8 @@ pub fn time_shell_command(
Ok((
TimingResult {
time_real,
time_user: 0,
time_system: 0,
time_user: 0f64,
time_system: 0f64,
},
status.success(),
))
+2
View File
@@ -1,3 +1,5 @@
#![cfg(not(target_os = "windows"))]
use libc::{getrusage, rusage, RUSAGE_CHILDREN};
use std::mem;
+4
View File
@@ -147,6 +147,10 @@ fn main() {
},
};
if cfg!(target_os = "windows") {
options.output_style = OutputStyleOption::Basic;
}
if options.output_style == OutputStyleOption::Basic {
colored::control::set_override(false);
}