diff options
| -rw-r--r-- | src/tools/miri/src/clock.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/miri/src/clock.rs b/src/tools/miri/src/clock.rs index 2ace9b66de7..e730f523c7b 100644 --- a/src/tools/miri/src/clock.rs +++ b/src/tools/miri/src/clock.rs @@ -102,7 +102,7 @@ impl Clock { ClockKind::Virtual { nanoseconds } => { // Just pretend that we have slept for some time. let nanos: u128 = duration.as_nanos(); - nanoseconds.update(|x| x + nanos); + nanoseconds.update(|x| x.checked_add(nanos).expect("Miri's virtual clock cannot represent an execution this long")); } } } |
