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 6e212a3 commit 46a62b2Copy full SHA for 46a62b2
src/tools/miri/tests/pass-dep/libc/libc-time.rs
@@ -360,6 +360,7 @@ mod test_clock_nanosleep {
360
fn add_100_millis(mut ts: libc::timespec) -> libc::timespec {
361
const SECOND: i64 = 1_000_000_000;
362
ts.tv_nsec += SECOND / 10;
363
+ // If this pushes tv_nsec to SECOND or higher, we need to overflow to tv_sec.
364
ts.tv_sec += ts.tv_nsec / SECOND;
365
ts.tv_nsec %= SECOND;
366
ts
0 commit comments