diff --git a/tokio/src/time/instant.rs b/tokio/src/time/instant.rs index faf7b1084..ebe991d08 100644 --- a/tokio/src/time/instant.rs +++ b/tokio/src/time/instant.rs @@ -126,6 +126,18 @@ impl Instant { } } +impl From for Instant { + fn from(time: std::time::Instant) -> Instant { + Instant::from_std(time) + } +} + +impl From for std::time::Instant { + fn from(time: Instant) -> std::time::Instant { + time.into_std() + } +} + impl ops::Add for Instant { type Output = Instant;