From 87299298d925af0943c94d2cc5bb8a2711d9f6b4 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Thu, 24 Mar 2022 09:51:48 +0100 Subject: Use FUTEX_WAIT_BITSET rather than FUTEX_WAIT on Linux. --- library/std/src/sys/unix/time.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'library/std/src/sys/unix/time.rs') diff --git a/library/std/src/sys/unix/time.rs b/library/std/src/sys/unix/time.rs index 59ddd1aa92f..64c249f33eb 100644 --- a/library/std/src/sys/unix/time.rs +++ b/library/std/src/sys/unix/time.rs @@ -299,6 +299,10 @@ mod inner { pub fn checked_sub_duration(&self, other: &Duration) -> Option { Some(Instant { t: self.t.checked_sub_duration(other)? }) } + + pub(in crate::sys::unix) fn as_timespec(&self) -> libc::timespec { + self.t.t + } } impl fmt::Debug for Instant { -- cgit 1.4.1-3-g733a5