mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-27 19:27:21 -06:00
11 lines
273 B
Rust
11 lines
273 B
Rust
#[cfg(not(target_arch = "wasm32"))]
|
|
pub(crate) fn now() -> u64 {
|
|
use std::time::{SystemTime, UNIX_EPOCH};
|
|
SystemTime::now().duration_since(UNIX_EPOCH).map(|d| d.as_micros() as u64).unwrap_or(0)
|
|
}
|
|
|
|
#[cfg(target_arch = "wasm32")]
|
|
pub(crate) fn now() -> u64 {
|
|
0
|
|
}
|