diff --git a/TIFoundationUtils/Sources/TITimer/Sources/TITimer/TITimer.swift b/TIFoundationUtils/Sources/TITimer/Sources/TITimer/TITimer.swift index cdef7749..fe89c6f3 100644 --- a/TIFoundationUtils/Sources/TITimer/Sources/TITimer/TITimer.swift +++ b/TIFoundationUtils/Sources/TITimer/Sources/TITimer/TITimer.swift @@ -155,7 +155,9 @@ private extension TITimer { func startDispatchSourceTimer(interval: TimeInterval, queue: DispatchQueue) -> Invalidatable? { let timer = DispatchSource.makeTimerSource(flags: [], queue: queue) timer.schedule(deadline: .now() + interval, repeating: interval) - timer.setEventHandler(handler: handleSourceUpdate) + timer.setEventHandler() { [weak self] in + self?.handleSourceUpdate() + } timer.resume()