MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / abs

Method abs

crates/sats/src/time_duration.rs:66–68  ·  view source on GitHub ↗

Returns a positive `TimeDuration` with the magnitude of `self`.

(self)

Source from the content-addressed store, hash-verified

64
65 /// Returns a positive `TimeDuration` with the magnitude of `self`.
66 pub fn abs(self) -> Self {
67 Self::from_micros(self.to_micros().saturating_abs())
68 }
69
70 /// Return a [`TimeDuration`] which represents the same span as `duration`.
71 ///

Callers 11

DrawingCanvasFunction · 0.45
handleMouseDownFunction · 0.45
handleMouseMoveFunction · 0.45
getUserColorFunction · 0.45
AppFunction · 0.45
nearby_playersFunction · 0.45
to_timestamp_fromMethod · 0.45
fmtMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45

Calls 1

to_microsMethod · 0.80

Tested by

no test coverage detected