Skip to content

Commit 30bd486

Browse files
committed
sleep_until: add clock_nanosleep support to Miri
The clock_nanosleep support is there to allow code using `sleep_until` to run under Miri. Therefore the implementation is minimal. - Only the clocks REALTIME and MONOTONIC are supported. The first is supported simply because it was trivial to add not because it was needed for sleep_until. - The only supported flag combinations are no flags or TIMER_ABSTIME only. If an unsupported flag combination or clock is passed in this throws unsupported.
1 parent e4071ad commit 30bd486

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

std/src/sys/pal/unix/thread.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ impl Thread {
297297
}
298298

299299
// Any unix that has clock_nanosleep
300+
// If this list changes update the MIRI chock_nanosleep shim
300301
#[cfg(any(
301302
target_os = "freebsd",
302303
target_os = "netbsd",

0 commit comments

Comments
 (0)