MCPcopy Create free account
hub / github.com/bytecodealliance/wstd / duration_since

Method duration_since

src/time/instant.rs:32–34  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 {

Callers 5

debug_durationFunction · 0.80
elapsedMethod · 0.80
http_wait_responseFunction · 0.80
http_wait_bodyFunction · 0.80
http_stream_bodyFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected