Skip to main content

helix_driver_native/
clock.rs

1//! NativeClock — SystemTime
2
3use helix_core::ports::Clock;
4
5#[derive(Clone, Debug)]
6pub struct NativeClock;
7
8impl Clock for NativeClock {
9    fn now_ms(&self) -> u64 {
10        use std::time::{SystemTime, UNIX_EPOCH};
11        SystemTime::now()
12            .duration_since(UNIX_EPOCH)
13            .unwrap_or_default()
14            .as_millis() as u64
15    }
16}