Start work on event creation

This commit is contained in:
timokoesters 2020-03-29 13:48:44 +02:00
parent 744e0adfcf
commit 73e04e71d7
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
5 changed files with 36 additions and 3 deletions

9
src/utils.rs Normal file
View 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()
}