Skip to content

Commit c293de0

Browse files
committed
expand on why the futex test skips mach_timebase_info
1 parent 1b1f9db commit c293de0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/pass-dep/concurrency/apple-futex.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ fn wait_absolute_timeout() {
8787
#[allow(deprecated)]
8888
let mut deadline = unsafe { libc::mach_absolute_time() };
8989

90-
// Add 200ms (note: this only works under miri because it uses nanosecond units for
91-
// mach_absolute_time).
90+
// Add 200ms.
91+
// 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.
9294
deadline += 200_000_000;
9395

9496
let futex: i32 = 123;

0 commit comments

Comments
 (0)