diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2022-03-24 09:51:48 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2022-03-24 09:51:48 +0100 |
| commit | 87299298d925af0943c94d2cc5bb8a2711d9f6b4 (patch) | |
| tree | 71dcc832b7243a62c4367410a0889119de7098bb /library/std/src/sys/unix/time.rs | |
| parent | da4ef044c1d0e8e58f2ab18459208469110c04be (diff) | |
| download | rust-87299298d925af0943c94d2cc5bb8a2711d9f6b4.tar.gz rust-87299298d925af0943c94d2cc5bb8a2711d9f6b4.zip | |
Use FUTEX_WAIT_BITSET rather than FUTEX_WAIT on Linux.
Diffstat (limited to 'library/std/src/sys/unix/time.rs')
| -rw-r--r-- | library/std/src/sys/unix/time.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<Instant> { 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 { |
