Stop and restart a timer
问题 I want to stop this timer and then restart it from where I stopped it. secondsTimer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(addSeconds), userInfo: nil, repeats: true) Below, it was suggested I shouldn't increment a timer in my timer handler. Why not? For example, using GCD timer: func countSeconds() { secondsTimer = DispatchSource.makeTimerSource(queue: .main) secondsTimer?.schedule(deadline: .now(), repeating: 1.0) secondsTimer?.setEventHandler { [weak