add: developer panel
This commit is contained in:
parent
ebded00fd3
commit
39574df691
44 changed files with 982 additions and 84 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "tetratto-shared"
|
||||
version = "6.0.0"
|
||||
version = "7.0.0"
|
||||
edition = "2024"
|
||||
authors.workspace = true
|
||||
repository.workspace = true
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue