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
| Member | Description | Available through |
|---|---|---|
| Equatable | Supports equality comparison. |
Variants
| Member | Description | Available through |
|---|---|---|
| Ended | The timer has ended. | |
| NotRunning | The timer has not started. | |
| Paused | The timer is paused. | |
| Running | The timer is running. | |
| Unknown | The host returned an unknown timer state. |
Operators
| Member | Description | Available through |
|---|---|---|
| == | Reports whether this value and another value are equal. | Available through Equatable |
| != | Reports whether this value and another value differ. | Available through Equatable |