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.
mach_timebase_info
1 parent 1b1f9db commit c293de0Copy full SHA for c293de0
tests/pass-dep/concurrency/apple-futex.rs
@@ -87,8 +87,10 @@ fn wait_absolute_timeout() {
87
#[allow(deprecated)]
88
let mut deadline = unsafe { libc::mach_absolute_time() };
89
90
- // Add 200ms (note: this only works under miri because it uses nanosecond units for
91
- // mach_absolute_time).
+ // Add 200ms.
+ // What we should be doing here is call `mach_timebase_info` to determine the
92
+ // unit used for `deadline`, but we know what Miri returns for that function:
93
+ // the unit is nanoseconds.
94
deadline += 200_000_000;
95
96
let futex: i32 = 123;
0 commit comments