wasm fixes

This commit is contained in:
John Smith
2022-11-27 10:52:07 -05:00
parent 87366c7fb2
commit 80c8a62ea1
9 changed files with 36 additions and 74 deletions

View File

@@ -5,7 +5,7 @@ cfg_if! {
use js_sys::Date;
pub fn get_timestamp() -> u64 {
if utils::is_browser() {
if is_browser() {
return (Date::now() * 1000.0f64) as u64;
} else {
panic!("WASM requires browser environment");