15 lines
279 B
Rust
Raw Normal View History

2024-04-25 18:51:42 +02:00
use std::time::{SystemTime, UNIX_EPOCH};
/// Get the current time since epoch
///
/// ```
/// use remote_backend::utils::time;
/// let time = time();
/// ```
pub fn time() -> u64 {
SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs()
}