Managed to query VirtWeb API

This commit is contained in:
2024-04-25 18:51:42 +02:00
parent 38e69ea167
commit 48f24e6ca1
7 changed files with 117 additions and 2 deletions

View File

@ -0,0 +1,14 @@
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()
}