diff options
| author | Linus Färnstrand <faern@faern.net> | 2019-03-22 22:14:35 +0100 |
|---|---|---|
| committer | Linus Färnstrand <faern@faern.net> | 2019-03-22 23:56:40 +0100 |
| commit | 1ccad16231f58b09f127e679d54162acbc2f0dae (patch) | |
| tree | 3063eeccdb21cb5810661ebecd4f689bee1c1c86 /src/libstd/sys/sgx | |
| parent | d56b1fd0e7c09445574bae34332eeefa93713e44 (diff) | |
| download | rust-1ccad16231f58b09f127e679d54162acbc2f0dae.tar.gz rust-1ccad16231f58b09f127e679d54162acbc2f0dae.zip | |
Update sys::time impls to have checked_sub_instant
Diffstat (limited to 'src/libstd/sys/sgx')
| -rw-r--r-- | src/libstd/sys/sgx/time.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<Duration> { + self.0.checked_sub(other.0) } pub fn checked_add_duration(&self, other: &Duration) -> Option<Instant> { |
