about summary refs log tree commit diff
path: root/library/std/src/time.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/time.rs')
-rw-r--r--library/std/src/time.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/library/std/src/time.rs b/library/std/src/time.rs
index 03af35e809c..979f51ad3a3 100644
--- a/library/std/src/time.rs
+++ b/library/std/src/time.rs
@@ -407,6 +407,15 @@ impl Instant {
     pub fn checked_sub(&self, duration: Duration) -> Option<Instant> {
         self.0.checked_sub_duration(&duration).map(Instant)
     }
+
+    // Used by platform specific `sleep_until` implementations such as the one used on Linux.
+    #[cfg_attr(
+        not(target_os = "linux"),
+        allow(unused, reason = "not every platform has a specific `sleep_until`")
+    )]
+    pub(crate) fn into_inner(self) -> time::Instant {
+        self.0
+    }
 }
 
 #[stable(feature = "time2", since = "1.8.0")]