1 2 3 4 5 6 7 8 9 10 11
use js_sys::Date; #[doc(hidden)] pub struct Timestamp; impl Timestamp { /// Returns the current wall-clock time as milliseconds since the Unix epoch. pub fn now() -> u64 { Date::now() as u64 } }