added: support time on JavaScript
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Mon, 15 May 2023 18:16:47 +0000 (13:16 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Mon, 15 May 2023 18:16:47 +0000 (13:16 -0500)
core/runtime/platform/js/platform.onyx

index 9fb20ceb6646a1b4aa71c1937bb1d57ef9203b2b..fe162d8e68b4597b270f7de214bd42bdd38c66f3 100644 (file)
@@ -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.