mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
add cfg for not wasmbind for time
This commit is contained in:
1 parent
63c9909aa0
commit
dbb6794a41
1 file changed
+5
-1
@@ -97,7 +97,11 @@ mod decl {
|
||||
_time(vm)
|
||||
}
|
||||
|
||||
#[cfg(any(not(target_arch = "wasm32"), target_os = "wasi"))]
|
||||
#[cfg(any(
|
||||
not(target_arch = "wasm32"),
|
||||
target_os = "wasi",
|
||||
not(feature = "wasmbind")
|
||||
))]
|
||||
fn _time(vm: &VirtualMachine) -> PyResult<f64> {
|
||||
Ok(duration_since_system_now(vm)?.as_secs_f64())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user