SplitScript reference / TimerState

TimerState

enum

enum TimerState

Describes the current timer state.

Timer state is an exhaustive enum returned by timer.state.

Examples

Match the complete timer state

let label = match timer.state() {
    TimerState.NotRunning => "Not running",
    TimerState.Running => "Running",
    TimerState.Paused => "Paused",
    TimerState.Ended => "Ended",
    TimerState.Unknown => "Unknown"
}

Capabilities

MemberDescriptionAvailable through
EquatableSupports equality comparison.

Variants

MemberDescriptionAvailable through
EndedThe timer has ended.
NotRunningThe timer has not started.
PausedThe timer is paused.
RunningThe timer is running.
UnknownThe host returned an unknown timer state.

Operators

MemberDescriptionAvailable through
==Reports whether this value and another value are equal.Available through Equatable
!=Reports whether this value and another value differ.Available through Equatable