mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Support minutes, hours, and time unit aliases
This commit is contained in:
1 parent
16e23a1b42
commit
84ff04f35d
6 files changed
+42
-10
No files matched your search
@@ -21,7 +21,8 @@ pub fn format_duration_value(duration: Second, unit: Option<Unit>) -> (String, U
|
||||
} else if (duration < 1.0 && unit.is_none()) || unit == Some(Unit::MilliSecond) {
|
||||
(Unit::MilliSecond.format(duration), Unit::MilliSecond)
|
||||
} else {
|
||||
(Unit::Second.format(duration), Unit::Second)
|
||||
let unit = unit.unwrap_or(Unit::Second);
|
||||
(unit.format(duration), unit)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user