Skip to content

Commit d2a4a33

Browse files
committed
following chrono/wasmbind convention
1 parent d8c3577 commit d2a4a33

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

vm/src/stdlib/time.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,20 @@ mod decl {
9797
_time(vm)
9898
}
9999

100-
#[cfg(any(
101-
not(target_arch = "wasm32"),
102-
target_os = "wasi",
103-
not(feature = "wasmbind")
104-
))]
100+
#[cfg(not(all(
101+
target_arch = "wasm32",
102+
feature = "wasmbind",
103+
not(any(target_os = "emscripten", target_os = "wasi"))
104+
)))]
105105
fn _time(vm: &VirtualMachine) -> PyResult<f64> {
106106
Ok(duration_since_system_now(vm)?.as_secs_f64())
107107
}
108108

109-
#[cfg(all(target_arch = "wasm32", not(target_os = "wasi"), feature = "wasmbind"))]
109+
#[cfg(all(
110+
target_arch = "wasm32",
111+
feature = "wasmbind",
112+
not(any(target_os = "emscripten", target_os = "wasi"))
113+
))]
110114
fn _time(_vm: &VirtualMachine) -> PyResult<f64> {
111115
use wasm_bindgen::prelude::*;
112116
#[wasm_bindgen]

0 commit comments

Comments
 (0)