mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-17 23:52:34 +00:00
Centralize compatibility notice detection and elapsed-time/error-cause helpers used by metadata snapshot event rendering and emission.
6 lines
153 B
Rust
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)
|
|
}
|