Merge pull request #1212 from TheBlueMatt/2021-12-timeout-graph
[rust-lightning] / lightning / src / ln / channelmanager.rs
index 47d705fe625b4889d7d3da19681af0d4272b8807..1b0fa19e163a50811d6395e9ca138e2e47bffb8f 100644 (file)
@@ -67,10 +67,11 @@ use io::{Cursor, Read};
 use sync::{Arc, Condvar, Mutex, MutexGuard, RwLock, RwLockReadGuard};
 use core::sync::atomic::{AtomicUsize, Ordering};
 use core::time::Duration;
-#[cfg(any(test, feature = "allow_wallclock_use"))]
-use std::time::Instant;
 use core::ops::Deref;
 
+#[cfg(any(test, feature = "std"))]
+use std::time::Instant;
+
 // We hold various information about HTLC relay in the HTLC objects in Channel itself:
 //
 // Upon receipt of an HTLC from a peer, we'll give it a PendingHTLCStatus indicating if it should
@@ -5110,8 +5111,9 @@ where
        /// indicating whether persistence is necessary. Only one listener on
        /// `await_persistable_update` or `await_persistable_update_timeout` is guaranteed to be woken
        /// up.
-       /// Note that the feature `allow_wallclock_use` must be enabled to use this function.
-       #[cfg(any(test, feature = "allow_wallclock_use"))]
+       ///
+       /// Note that this method is not available with the `no-std` feature.
+       #[cfg(any(test, feature = "std"))]
        pub fn await_persistable_update_timeout(&self, max_wait: Duration) -> bool {
                self.persistence_notifier.wait_timeout(max_wait)
        }
@@ -5406,7 +5408,7 @@ impl PersistenceNotifier {
                }
        }
 
-       #[cfg(any(test, feature = "allow_wallclock_use"))]
+       #[cfg(any(test, feature = "std"))]
        fn wait_timeout(&self, max_wait: Duration) -> bool {
                let current_time = Instant::now();
                loop {