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

Function wall_now_ms

nodedb/src/engine/document/store/engine/batch.rs:17–23  ·  view source on GitHub ↗

Wall-clock millisecond timestamp for versioned writes. Used only by [`DocumentEngine`] (the lower-level struct API). The [`CoreLoop`] Calvin write path uses `bitemporal_now_ms()` instead, which threads the deterministic epoch timestamp through `CoreLoop::epoch_system_ms`. This function is therefore NOT reachable from any Calvin write path.

()

Source from the content-addressed store, hash-verified

15/// threads the deterministic epoch timestamp through `CoreLoop::epoch_system_ms`.
16/// This function is therefore NOT reachable from any Calvin write path.
17pub(super) fn wall_now_ms() -> i64 {
18 // no-determinism: off the Calvin path; CoreLoop uses bitemporal_now_ms() which reads epoch_system_ms
19 SystemTime::now()
20 .duration_since(UNIX_EPOCH)
21 .map(|d| i64::try_from(d.as_millis()).unwrap_or(i64::MAX))
22 .unwrap_or(0)
23}
24
25pub struct DocumentEngine<'a> {
26 pub(super) sparse: &'a SparseEngine,

Callers 2

deleteMethod · 0.70
put_rawMethod · 0.70

Calls 3

nowFunction · 0.85
duration_sinceMethod · 0.80
as_millisMethod · 0.45

Tested by

no test coverage detected