diff --git a/proxmox-login/src/ticket.rs b/proxmox-login/src/ticket.rs index 5784ef9c..9f98cc1f 100644 --- a/proxmox-login/src/ticket.rs +++ b/proxmox-login/src/ticket.rs @@ -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 { use std::time::{SystemTime, UNIX_EPOCH};