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 408813b commit 0d851eeCopy full SHA for 0d851ee
src/shims/time.rs
@@ -111,7 +111,10 @@ impl Clock {
111
(
112
Instant::Virtual { nanoseconds },
113
Clock::Virtual { nanoseconds: current_ns },
114
- ) => Duration::from_nanos(nanoseconds - current_ns.load(Ordering::Relaxed)),
+ ) =>
115
+ Duration::from_nanos(
116
+ nanoseconds.saturating_sub(current_ns.load(Ordering::Relaxed)),
117
+ ),
118
_ => panic!(),
119
},
120
Time::RealTime(time) =>
0 commit comments