MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / current_ms

Function current_ms

nodedb/src/engine/kv/mod.rs:30–36  ·  view source on GitHub ↗

Get current wall-clock time in milliseconds since Unix epoch. Used as a fallback for non-Calvin write paths. Calvin write paths call `CoreLoop::epoch_system_ms.unwrap_or_else(current_ms)` so that the epoch's deterministic timestamp anchor is used when available.

()

Source from the content-addressed store, hash-verified

28/// `CoreLoop::epoch_system_ms.unwrap_or_else(current_ms)` so that the epoch's
29/// deterministic timestamp anchor is used when available.
30pub fn current_ms() -> u64 {
31 // no-determinism: fallback for non-Calvin paths; Calvin paths gate through epoch_system_ms
32 std::time::SystemTime::now()
33 .duration_since(std::time::UNIX_EPOCH)
34 .map(|d| d.as_millis() as u64)
35 .unwrap_or(0)
36}

Callers 15

register_sorted_indexMethod · 0.70
scan_kvMethod · 0.50
replay_kv_walMethod · 0.50
execute_kv_batch_getMethod · 0.50
execute_kv_field_getMethod · 0.50
execute_kv_field_setMethod · 0.50
execute_kv_get_ttlMethod · 0.50
execute_kv_getMethod · 0.50
execute_kv_insertMethod · 0.50
execute_kv_deleteMethod · 0.50

Calls 3

nowFunction · 0.85
duration_sinceMethod · 0.80
as_millisMethod · 0.45

Tested by

no test coverage detected