Skip to content

Commit 9a875a8

Browse files
committed
refactor(timings): rename to round_to_centisecond
1 parent 4d119f5 commit 9a875a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cargo/core/compiler/timings/report.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ pub(super) fn to_unit_data(
381381
mode,
382382
target: ut.target.clone(),
383383
features: ut.unit.features.iter().map(|f| f.to_string()).collect(),
384-
start: round(ut.start),
385-
duration: round(ut.duration),
384+
start: round_to_centisecond(ut.start),
385+
duration: round_to_centisecond(ut.duration),
386386
unblocked_units,
387387
unblocked_rmeta_units,
388388
sections,
@@ -468,7 +468,7 @@ fn aggregate_sections(unit_time: &UnitTime) -> AggregatedSections {
468468
}
469469

470470
/// Rounds seconds to 0.01s precision.
471-
fn round(x: f64) -> f64 {
471+
fn round_to_centisecond(x: f64) -> f64 {
472472
(x * 100.0).round() / 100.0
473473
}
474474

0 commit comments

Comments
 (0)