From: Brendan Hansen Date: Mon, 15 May 2023 18:16:47 +0000 (-0500) Subject: added: support time on JavaScript X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=341f60ef049ae742365d348f2e5746092064a1c4;p=onyx.git added: support time on JavaScript --- diff --git a/core/runtime/platform/js/platform.onyx b/core/runtime/platform/js/platform.onyx index 9fb20ceb..fe162d8e 100644 --- a/core/runtime/platform/js/platform.onyx +++ b/core/runtime/platform/js/platform.onyx @@ -14,7 +14,7 @@ Supports_Files :: false Supports_Directories :: false Supports_Os :: false Supports_Processes :: false -Supports_Time :: false +Supports_Time :: true Supports_Networking :: false Supports_Type_Info :: true Supports_Threads :: true @@ -23,6 +23,7 @@ Supports_Env_Vars :: false __output_string :: (s: str) -> u32 #foreign "host" "print_str" --- __output_error :: (s: str) -> u32 #foreign "host" "print_str" --- __exit :: (status: i32) -> void #foreign "host" "exit" --- +__time :: () -> i64 #foreign "host" "time" --- __read_from_input :: (buf: [] u8) -> u32 do return 0; // Sets up everything needed for execution.