Start work on event creation
This commit is contained in:
parent
744e0adfcf
commit
73e04e71d7
5 changed files with 36 additions and 3 deletions
9
src/utils.rs
Normal file
9
src/utils.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
pub fn millis_since_unix_epoch() -> js_int::UInt {
|
||||
(SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.unwrap()
|
||||
.as_millis() as u32)
|
||||
.into()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue