Mode
public indirect enum Mode : Equatable, CustomStringConvertible
This defines the six timer states
-
The timer is “stopped.” It is set to the starting time, and the timer is not running.
Declaration
Swift
case stopped
-
The timer is in the time between the “starting” threshold, and the next threshold (warning, final, or alarm).
Declaration
Swift
case countdown
-
The timer is in the time between the “warning” threshold, and the next threshold (final or alarm).
Declaration
Swift
case warning
-
The timer is in the time between the “warning” threshold, and 0 (alarm).
Declaration
Swift
case final
-
The timer is at 0.
Declaration
Swift
case alarm
-
The timer is between 0 and the “starting time,” but is not running.
Declaration
Swift
case paused(mode: Mode, pauseTime: TimeInterval)
Parameters
mode
The mode (countdown, warning, or final) that the timer was in, before the pause.
pauseTime
The precise progress along the countdown that the timer had achieved, at the time of the pause.
-
Debug description (CustomStringConvertible conformance)
Declaration
Swift
public var description: String { get }