MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / now_ms

Function now_ms

crates/openshell-core/src/time.rs:12–16  ·  view source on GitHub ↗

Return the current Unix timestamp in milliseconds, saturating to [`i64::MAX`] on overflow. Returns `0` if the system clock is before the Unix epoch. Prefer this over local implementations of the same pattern.

()

Source from the content-addressed store, hash-verified

10///
11/// Prefer this over local implementations of the same pattern.
12pub fn now_ms() -> i64 {
13 SystemTime::now()
14 .duration_since(UNIX_EPOCH)
15 .map_or(0, |d| i64::try_from(d.as_millis()).unwrap_or(i64::MAX))
16}

Callers 15

reap_expired_sessionsFunction · 0.85
on_eventMethod · 0.85
current_time_msFunction · 0.85
prune_missing_sandboxMethod · 0.85
try_acquireMethod · 0.85
try_steal_expiredMethod · 0.85
on_eventMethod · 0.85
platform_eventFunction · 0.85

Calls

no outgoing calls