TimerCountdown

struct TimerCountdown

The time scale used by the running screen. Each timer still runs its own engine and warning thresholds.

  • The selected timer whose engine supplies the live countdown.

    Declaration

    Swift

    let timer: Timer
  • The presets that contribute duration to the timeline, in playback order.

    Declaration

    Swift

    let timers: [Timer]
  • Builds a timeline for the selected preset or for its group with zero-duration presets omitted.

    Declaration

    Swift

    init(_ timer: Timer, combineTimers: Bool)
  • The sum of the configured durations on this timeline in seconds.

    Declaration

    Swift

    var totalDuration: Int { get }
  • Preset durations after the active timer. Previously run timers never contribute to the time left.

    Declaration

    Swift

    var followingDuration: Int { get }
  • The active countdown plus the configured durations of later timers in seconds.

    Declaration

    Swift

    var remaining: Int { get }
  • At a transition, elapsed time belongs to the start of the next timer.

    Declaration

    Swift

    func position(atElapsedTime elapsed: Int) -> (timer: Timer, remaining: Int)