···62626363[target.'cfg(target_family = "wasm")'.dependencies]
6464getrandom = { version = "0.3.4", features = ["wasm_js"] }
6565-6666-[target.'cfg(target_arch = "wasm32")'.dependencies]
6565+chrono = { workspace = true, features = ["wasmbind"] }
6766getrandom_02 = { package = "getrandom", version = "0.2", features = ["js"] }
68676968[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
+1-5
crates/jacquard-common/src/types/tid.rs
···22use smol_str::{SmolStr, SmolStrBuilder};
33use std::fmt;
44use std::sync::LazyLock;
55-use std::time::SystemTime;
65use std::{ops::Deref, str::FromStr};
7687use crate::CowStr;
···306305307306 /// Generate the next TID, optionally ensuring it's after the given TID
308307 pub fn next(&mut self, prev: Option<Tid>) -> Tid {
309309- let now = SystemTime::now()
310310- .duration_since(SystemTime::UNIX_EPOCH)
311311- .expect("timestamp in micros since UNIX epoch")
312312- .as_micros() as u64;
308308+ let now = chrono::Utc::now().timestamp_micros() as u64;
313309 // mask to 53 bits
314310 let now = now & 0x001FFFFFFFFFFFFF;
315311 if now > self.last_timestamp {