Support Duration in no-std mode on new compilers

This commit is contained in:
David Tolnay
2018-06-03 00:55:58 -07:00
parent 94853752a1
commit b6c4cfec37
4 changed files with 14 additions and 5 deletions
+4 -1
View File
@@ -211,7 +211,10 @@ mod lib {
#[cfg(feature = "std")]
pub use std::sync::{Mutex, RwLock};
#[cfg(feature = "std")]
pub use std::time::{Duration, SystemTime, UNIX_EPOCH};
pub use std::time::{SystemTime, UNIX_EPOCH};
#[cfg(any(core_duration, feature = "std"))]
pub use self::core::time::Duration;
}
////////////////////////////////////////////////////////////////////////////////