refactor: correct self capture
This commit is contained in:
parent
91c15c21ed
commit
d23257e963
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue