From 2ecfead8f3f39a46fe4939033045ec22b18912b4 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Tue, 18 Jan 2022 13:15:49 -0600 Subject: [PATCH] fixed __sleep --- modules/onyx_runtime/onyx_runtime.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.25.1