libsw_core/instant_impls/
tokio.rs1extern crate tokio;
6
7use ::core::time::Duration;
8
9use crate::Instant;
10
11impl Instant for tokio::time::Instant {
12 fn now() -> Self {
13 Self::now()
15 }
16
17 fn checked_add(&self, duration: Duration) -> Option<Self> {
18 self.checked_add(duration)
19 }
20
21 fn checked_sub(&self, duration: Duration) -> Option<Self> {
22 self.checked_sub(duration)
23 }
24
25 fn saturating_duration_since(&self, earlier: Self) -> Duration {
26 self.saturating_duration_since(earlier)
27 }
28}