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.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// 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
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user