Skip to content

Commit 99fbd1b

Browse files
author
Vardhan Thigle
committedJan 13, 2019
Fix breakage from #56988 and workaround for #57569
1 parent 4a957b3 commit 99fbd1b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
 

‎src/libstd/sys/sgx/time.rs

+8
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ impl Instant {
2525
pub fn checked_sub_duration(&self, other: &Duration) -> Option<Instant> {
2626
Some(Instant(self.0.checked_sub(*other)?))
2727
}
28+
29+
pub fn actually_monotonic() -> bool {
30+
false
31+
}
32+
33+
pub const fn zero() -> Instant {
34+
Instant(Duration::from_secs(0))
35+
}
2836
}
2937

3038
impl SystemTime {

‎src/libstd/sys/sgx/waitqueue.rs

+1
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ mod spin_mutex {
456456
}
457457
}
458458

459+
/// Lock the Mutex or return false.
459460
pub macro try_lock_or_false {
460461
($e:expr) => {
461462
if let Some(v) = $e.try_lock() {

0 commit comments

Comments
 (0)
Please sign in to comment.