We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79a81e5 commit 386a328Copy full SHA for 386a328
1 file changed
cranelift/codegen/src/timing.rs
@@ -291,7 +291,7 @@ mod enabled {
291
impl Drop for DefaultTimingToken {
292
fn drop(&mut self) {
293
let now = monotonic_instant();
294
- let duration = self.start.duration_since(now);
+ let duration = now.duration_since(self.start);
295
log::debug!("timing: Ending {}: {}ms", self.pass, duration.as_millis());
296
let old_cur = CURRENT_PASS.with(|p| p.replace(self.prev));
297
assert_eq!(self.pass, old_cur, "Timing tokens dropped out of order");
0 commit comments