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 d3f167f commit 424a8edCopy full SHA for 424a8ed
src/tools/miri/tests/pass-dep/libc/libc-time.rs
@@ -420,9 +420,9 @@ mod test_clock_nanosleep {
420
/// Helper function used to create an instant in the future
421
fn add_100_millis(mut ts: libc::timespec) -> libc::timespec {
422
const SECOND: i64 = 1_000_000_000;
423
- ts.tv_nsec += ts.tv_nsec + SECOND / 10;
424
- ts.tv_nsec = ts.tv_nsec % SECOND;
+ ts.tv_nsec += SECOND / 10;
425
ts.tv_sec = ts.tv_nsec / SECOND;
+ ts.tv_nsec %= SECOND;
426
ts
427
}
428
0 commit comments