]>
Commit | Line | Data |
---|---|---|
c295e0f8 | 1 | pub type Instant = std::time::Instant;\r |
3c0e092e | 2 | pub type SystemTime = std::time::SystemTime;\r |
c295e0f8 | 3 | \r |
3c0e092e | 4 | /// The current time, expressed in milliseconds since the Unix Epoch.\r |
c295e0f8 | 5 | pub fn now() -> f64 {\r |
3c0e092e XL |
6 | std::time::SystemTime::now().duration_since(std::time::SystemTime::UNIX_EPOCH)\r |
7 | .expect("System clock was before 1970.")\r | |
8 | .as_secs_f64() * 1000.0\r | |
c295e0f8 | 9 | }\r |