add: developer panel

This commit is contained in:
trisua 2025-06-14 20:26:54 -04:00
parent ebded00fd3
commit 39574df691
44 changed files with 982 additions and 84 deletions

View file

@ -18,7 +18,7 @@ impl Snowflake {
Builder::new().epoch(UNIX_EPOCH + Duration::from_millis(EPOCH_2024))
}
/// Create a new [`AlmostSnowflake`]
/// Create a new [`Snowflake`]
pub fn new() -> Self {
Self(
Self::builder()

View file

@ -1,14 +1,14 @@
use chrono::{TimeZone, Utc};
use std::time::{SystemTime, UNIX_EPOCH};
/// Get a [`u128`] timestamp
pub fn unix_epoch_timestamp() -> u128 {
/// Get a [`usize`] timestamp
pub fn unix_epoch_timestamp() -> usize {
let right_now = SystemTime::now();
let time_since = right_now
.duration_since(UNIX_EPOCH)
.expect("Time travel is not allowed");
time_since.as_millis()
time_since.as_millis() as usize
}
/// Get a [`i64`] timestamp from the given `year` epoch