Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cranelift/codegen/src/timing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ mod enabled {

/// Returns the total amount of time taken by all the passes measured.
pub fn total(&self) -> Duration {
self.pass.iter().map(|p| p.total - p.child).sum()
self.pass
.iter()
.map(|p| p.total.saturating_sub(p.child))
.sum()
}
}

Expand Down