Add Clock trait

This commit is contained in:
Avinash Sajjanshetty 2025-04-06 23:02:41 +05:30
parent e3c064fc47
commit 02ee2cf90e

9
core/io/clock.rs Normal file
View file

@ -0,0 +1,9 @@
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct Instant {
pub secs: i64,
pub micros: u32,
}
pub trait Clock {
fn now(&self) -> Instant;
}