BasicOIDC/src/utils/time.rs

6 lines
171 B
Rust
Raw Normal View History

2022-04-01 20:51:33 +00:00
use std::time::{SystemTime, UNIX_EPOCH};
/// Get the current time since epoch
pub fn time() -> u64 {
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()
}