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.
()
| 28 | /// `CoreLoop::epoch_system_ms.unwrap_or_else(current_ms)` so that the epoch's |
| 29 | /// deterministic timestamp anchor is used when available. |
| 30 | pub 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 | } |
no test coverage detected