-
Notifications
You must be signed in to change notification settings - Fork 16
Sys.IsRunning
boxgaming edited this page Jul 11, 2026
·
3 revisions
Returns true (-1) or false (0) depending on whether the main program execution is still active.
Available in release 0.11.0
This method can be useful when implementing event-based programming which can still respond to user or timed events after the main program has completed execution.
result% = Sys.IsRunning
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