summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ci_runner.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ci_runner.rs b/src/ci_runner.rs
index 63dc74e..9aaf33d 100644
--- a/src/ci_runner.rs
+++ b/src/ci_runner.rs
@@ -556,7 +556,10 @@ mod host_info {
let cpu_mhzes: Vec<&String> = cpu_lines.iter().filter(|line| line.starts_with("cpu MHz")).collect();
match cpu_mhzes.get(cpu as usize) {
Some(mhz) => {
- let mhz: f64 = cpu_mhzes[cpu as usize].trim().parse().unwrap();
+ let mut line_parts = cpu_mhzes[cpu as usize].split(":");
+ let _ = line_parts.next();
+ let mhz = line_parts.next().unwrap().trim();
+ let mhz: f64 = mhz.parse().unwrap();
Ok((mhz * 1000.0) as u64)
},
None => {