Files
iceglass/IceGlass/Extensions/Timer+startTimer.swift
T
rzen 8f8f8b2755 Initial commit: IceGlass NHL game tracker
macOS menu bar app providing NHL game situational awareness with
league-wide scoreboard, dynamic polling, notifications with team
logos, and configurable display options.
2026-04-13 21:44:08 -04:00

20 lines
438 B
Swift

//
// Timer+startTimer.swift
// IceGlass
//
// Copyright 2026 Rouslan Zenetl. All Rights Reserved.
//
import Foundation
extension Timer {
static func startTimer(timer: Timer?, interval: TimeInterval, action: @escaping @Sendable (Timer) -> Void) -> Timer {
timer?.invalidate()
return Timer.scheduledTimer(
withTimeInterval: interval,
repeats: true,
block: action
)
}
}