We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0fb350 commit e85c521Copy full SHA for e85c521
src/tools/miri/src/clock.rs
@@ -102,7 +102,7 @@ impl Clock {
102
ClockKind::Virtual { nanoseconds } => {
103
// Just pretend that we have slept for some time.
104
let nanos: u128 = duration.as_nanos();
105
- nanoseconds.update(|x| x + nanos);
+ nanoseconds.update(|x| x.checked_add(nanos).expect("Miri's virtual clock cannot represent an execution this long"));
106
}
107
108
0 commit comments