move repos into monorepo

This commit is contained in:
Timur Gordon
2025-11-13 20:44:00 +01:00
commit 4b23e5eb7f
204 changed files with 33737 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
use std::time::{SystemTime, UNIX_EPOCH};
/// A timestamp since the unix epoch
pub type Timestamp = i64;
/// Get the current system timestamp
pub fn current_timestamp() -> Timestamp {
let now = SystemTime::now();
// A duration is always positive so this returns an unsigned integer, while a timestamp can
// predate the unix epoch so we must cast to a signed integer.
now.duration_since(UNIX_EPOCH)
.expect("Time moves forward")
.as_secs() as i64
}