]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys/unix/time.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / library / std / src / sys / unix / time.rs
index ffcc507d2a763f9a430d99af59c098caa5b79892..2daad981b73e9a94af6e3b3f779b029d4026076e 100644 (file)
@@ -5,6 +5,9 @@
 
 const NSEC_PER_SEC: u64 = 1_000_000_000;
 pub const UNIX_EPOCH: SystemTime = SystemTime { t: Timespec::zero() };
+#[allow(dead_code)] // Used for pthread condvar timeouts
+pub const TIMESPEC_MAX: libc::timespec =
+    libc::timespec { tv_sec: <libc::time_t>::MAX, tv_nsec: 1_000_000_000 - 1 };
 
 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
 #[repr(transparent)]
@@ -150,7 +153,7 @@ fn from(t: libc::timespec) -> Timespec {
 }
 
 #[cfg(any(
-    all(target_os = "macos", any(not(target_arch = "aarch64"), miri)),
+    all(target_os = "macos", any(not(target_arch = "aarch64"))),
     target_os = "ios",
     target_os = "watchos"
 ))]
@@ -270,7 +273,7 @@ fn info_from_bits(bits: u64) -> mach_timebase_info {
 }
 
 #[cfg(not(any(
-    all(target_os = "macos", any(not(target_arch = "aarch64"), miri)),
+    all(target_os = "macos", any(not(target_arch = "aarch64"))),
     target_os = "ios",
     target_os = "watchos"
 )))]