instant/native.rs
1pub type Instant = std::time::Instant;
2pub type SystemTime = std::time::SystemTime;
3
4/// The current time, expressed in milliseconds since the Unix Epoch.
5pub fn now() -> f64 {
6 std::time::SystemTime::now().duration_since(std::time::SystemTime::UNIX_EPOCH)
7 .expect("System clock was before 1970.")
8 .as_secs_f64() * 1000.0
9}