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.
()
| 15 | /// threads the deterministic epoch timestamp through `CoreLoop::epoch_system_ms`. |
| 16 | /// This function is therefore NOT reachable from any Calvin write path. |
| 17 | pub(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 | |
| 25 | pub struct DocumentEngine<'a> { |
| 26 | pub(super) sparse: &'a SparseEngine, |
no test coverage detected