diff options
| author | bors <bors@rust-lang.org> | 2022-12-28 03:56:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-28 03:56:46 +0000 |
| commit | 6a4624d73b34153811f7642b89bd396306aa7843 (patch) | |
| tree | ac0f28b8e3ae3d1b1fb991a58e80d58ff9a55ab1 /library/std/src/sys | |
| parent | 739d68a76e35b22341d9930bb6338bf202ba05ba (diff) | |
| parent | ce051df3d1b9ee41cc8ae447158b648de3dfe356 (diff) | |
| download | rust-6a4624d73b34153811f7642b89bd396306aa7843.tar.gz rust-6a4624d73b34153811f7642b89bd396306aa7843.zip | |
Auto merge of #100539 - joboet:horizon_timeout_clock, r=thomcc
Use correct clock in `park_timeout` on Horizon Horizon does not support using `CLOCK_MONOTONIC` with condition variables, so use the system time instead.
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/unix/thread_parker/pthread.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/thread_parker/pthread.rs b/library/std/src/sys/unix/thread_parker/pthread.rs index c400c771567..510168a010f 100644 --- a/library/std/src/sys/unix/thread_parker/pthread.rs +++ b/library/std/src/sys/unix/thread_parker/pthread.rs @@ -44,7 +44,8 @@ unsafe fn wait_timeout( target_os = "macos", target_os = "ios", target_os = "watchos", - target_os = "espidf" + target_os = "espidf", + target_os = "horizon", ))] let (now, dur) = { use crate::cmp::min; @@ -70,7 +71,8 @@ unsafe fn wait_timeout( target_os = "macos", target_os = "ios", target_os = "watchos", - target_os = "espidf" + target_os = "espidf", + target_os = "horizon", )))] let (now, dur) = { use crate::sys::time::Timespec; |
