From 1ccad16231f58b09f127e679d54162acbc2f0dae Mon Sep 17 00:00:00 2001 From: Linus Färnstrand Date: Fri, 22 Mar 2019 22:14:35 +0100 Subject: Update sys::time impls to have checked_sub_instant --- src/libstd/sys/sgx/time.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/sys/sgx') diff --git a/src/libstd/sys/sgx/time.rs b/src/libstd/sys/sgx/time.rs index e4f789c3e36..4659f7ba71f 100644 --- a/src/libstd/sys/sgx/time.rs +++ b/src/libstd/sys/sgx/time.rs @@ -14,8 +14,8 @@ impl Instant { Instant(usercalls::insecure_time()) } - pub fn sub_instant(&self, other: &Instant) -> Duration { - self.0 - other.0 + pub fn checked_sub_instant(&self, other: &Instant) -> Option { + self.0.checked_sub(other.0) } pub fn checked_add_duration(&self, other: &Duration) -> Option { -- cgit 1.4.1-3-g733a5