diff --git a/core/engine/src/context/time.rs b/core/engine/src/context/time.rs index 0fb4fca5b90..b7f04969282 100644 --- a/core/engine/src/context/time.rs +++ b/core/engine/src/context/time.rs @@ -123,10 +123,8 @@ impl std::ops::Sub for JsInstant { #[inline] fn sub(self, rhs: JsInstant) -> Self::Output { JsDuration { - inner: self - .inner - .checked_sub(rhs.inner) - .expect("overflow when subtracting durations"), + // saturating preserves the behaviour of std's Instant. + inner: self.inner.saturating_sub(rhs.inner), } } }