Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.
(&self, earlier: Instant)
| 30 | /// Returns the amount of time elapsed from another instant to this one, or zero duration if |
| 31 | /// that instant is later than this one. |
| 32 | pub fn duration_since(&self, earlier: Instant) -> Duration { |
| 33 | Duration::from_nanos(self.0.saturating_sub(earlier.0)) |
| 34 | } |
| 35 | |
| 36 | /// Returns the amount of time elapsed since this instant. |
| 37 | pub fn elapsed(&self) -> Duration { |
no outgoing calls
no test coverage detected