mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-11 19:01:14 +00:00
add special impl for epoch_i64() on target_arch="wasm32"
This commit is contained in:
parent
17f5eac57a
commit
ffa64bead7
@ -240,6 +240,12 @@ impl Authentication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch="wasm32")]
|
||||||
|
fn epoch_i64() -> i64 {
|
||||||
|
(js_sys::Date::now() / 1000.0) as i64;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_arch="wasm32"))]
|
||||||
fn epoch_i64() -> i64 {
|
fn epoch_i64() -> i64 {
|
||||||
use std::time::{SystemTime, UNIX_EPOCH};
|
use std::time::{SystemTime, UNIX_EPOCH};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user