Timer
Deferred timer system for non-blocking wait() on game-loop targets.
On sys targets, deferredMode starts false. Once the host calls
update() (or enableDeferredMode() directly), deferred mode is active
and wait() will register timers here instead of blocking with Sys.sleep().
For CLI/tool targets that never call update(), wait() falls back to the blocking Sys.sleep() path automatically.
Static Members
deferredMode: BoolTrue once the host's update loop has been connected. Gates deferred vs. blocking wait() on sys targets.
enableDeferredMode(): VoidProactively enable deferred mode without ticking timers. Call this before any interpreter work starts (e.g. in Loreline_createThread) to avoid a race condition where wait() runs before the first update().
Register a timer to fire done after seconds have elapsed.
Called by wait() when deferred mode is active.
| Name | Type |
|---|---|
seconds |
Float |
done |
Function |
Tick all pending timers by delta seconds, firing any that have expired.
Call this every frame from your game loop. The first call also enables
deferred mode on sys targets.
| Name | Type | Description |
|---|---|---|
delta |
Float | Time elapsed since the last frame in seconds. |
Private Members
timers: Array<loreline._Timer.PendingTimer>Metadata
| Name | Parameters |
|---|---|
:hxGen |
- |