11 lines
210 B
Rust
11 lines
210 B
Rust
|
use std::time::{SystemTime, UNIX_EPOCH};
|
||
|
|
||
|
/// Get the current time since epoch
|
||
|
|
||
|
pub fn time_millis() -> u128 {
|
||
|
SystemTime::now()
|
||
|
.duration_since(UNIX_EPOCH)
|
||
|
.unwrap()
|
||
|
.as_millis()
|
||
|
}
|