From: Brendan Hansen Date: Tue, 18 Jan 2022 19:15:49 +0000 (-0600) Subject: fixed __sleep X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=2ecfead8f3f39a46fe4939033045ec22b18912b4;p=onyx.git fixed __sleep --- diff --git a/modules/onyx_runtime/onyx_runtime.c b/modules/onyx_runtime/onyx_runtime.c index 8ff8bc3d..90348735 100644 --- a/modules/onyx_runtime/onyx_runtime.c +++ b/modules/onyx_runtime/onyx_runtime.c @@ -781,7 +781,13 @@ ONYX_DEF(__exit, (WASM_I32), ()) { } ONYX_DEF(__sleep, (WASM_I32), ()) { + #ifdef _BH_LINUX usleep(params->data[0].of.i32 * 1000); + #endif + + #ifdef _BH_WINDOWS + Sleep(params->data[0].of.i32); + #endif return NULL; }