fabro/lib/crates/fabro-util/src/time.rs
Bryan Helmkamp 07d3890bb8
refactor(workflow): share metadata snapshot helpers
Centralize compatibility notice detection and elapsed-time/error-cause helpers used by metadata snapshot event rendering and emission.
2026-04-29 19:43:30 -04:00

6 lines
153 B
Rust

use std::time::Instant;
#[must_use]
pub fn elapsed_ms(started: Instant) -> u64 {
u64::try_from(started.elapsed().as_millis()).unwrap_or(u64::MAX)
}