]> git.proxmox.com Git - rustc.git/blame - vendor/instant/src/native.rs
New upstream version 1.58.1+dfsg1
[rustc.git] / vendor / instant / src / native.rs
CommitLineData
c295e0f8 1pub type Instant = std::time::Instant;\r
3c0e092e 2pub type SystemTime = std::time::SystemTime;\r
c295e0f8 3\r
3c0e092e 4/// The current time, expressed in milliseconds since the Unix Epoch.\r
c295e0f8 5pub 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