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

Function current_time_ms

crates/openshell-supervisor-network/src/token_grant.rs:556–562  ·  view source on GitHub ↗

Get current Unix timestamp in milliseconds.

()

Source from the content-addressed store, hash-verified

554
555/// Get current Unix timestamp in milliseconds.
556fn current_time_ms() -> i64 {
557 let millis = SystemTime::now()
558 .duration_since(UNIX_EPOCH)
559 .unwrap_or(Duration::from_secs(0))
560 .as_millis();
561 i64::try_from(millis).unwrap_or(i64::MAX)
562}
563
564#[cfg(test)]
565mod tests {

Calls

no outgoing calls

Tested by

no test coverage detected