-
Notifications
You must be signed in to change notification settings - Fork 15
Sys.SetTimeout
boxgaming edited this page Jul 11, 2026
·
2 revisions
Sets a timer which executes a function or sub once the timer expires.
Available in release 0.11.0
Sys.SetTimeout fnCallback [, delay%]
- The fnCallback parameter is a reference to the function or sub which will be executed after the timer expires.
- The optional delay parameter is a non-negative integer indicating how long the timer should wait before the specified function or sub is executed, in milliseconds. Defaults to 0 if not specified.
Import Sys From "lib/lang/system.bas"
Sys.SetTimeout @CheckTime, 1000
Print "Press ESC to exit..."
While _KeyHit <> 27
_Limit 60
WEnd
Print "End of main code"
Sub CheckTime
Print Sys.IsRunning; ": "; Sys.TimeInMillis
If Sys.IsRunning Then
Sys.SetTimeout @CheckTime, 1000
End If
End SubPrint ESC to exit...
-1: 1783779913478
-1: 1783779914480
-1: 1783779915481
-1: 1783779916484
-1: 1783779917486
End of main code
0: 1783779918487
Dom.RequestAnimationFrame
Sys.TimeInMillis
JavaScript - window.setTimeout()