SplitScript reference / timer / state

timer.state

Function

timer.state() -> TimerState

Returns the current timer state.

Host states are converted to NotRunning, Running, Paused, Ended, or Unknown at the ABI boundary.

Effects: reads timer state

Runtime behavior: available everywhere; synchronous

Examples

Check whether the timer is running

let isRunning = timer.state() == TimerState.Running