Skip to content

Commit

Permalink
Fix breakage from rust-lang#56988 and workaround for rust-lang#57569
Browse files Browse the repository at this point in the history
  • Loading branch information
Vardhan Thigle committed Jan 13, 2019
1 parent 4a957b3 commit 99fbd1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libstd/sys/sgx/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ impl Instant {
pub fn checked_sub_duration(&self, other: &Duration) -> Option<Instant> {
Some(Instant(self.0.checked_sub(*other)?))
}

pub fn actually_monotonic() -> bool {
false
}

pub const fn zero() -> Instant {
Instant(Duration::from_secs(0))
}
}

impl SystemTime {
Expand Down
1 change: 1 addition & 0 deletions src/libstd/sys/sgx/waitqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ mod spin_mutex {
}
}

/// Lock the Mutex or return false.
pub macro try_lock_or_false {
($e:expr) => {
if let Some(v) = $e.try_lock() {
Expand Down

0 comments on commit 99fbd1b

Please sign in to comment.