Timer
Timer copied to clipboard
[BUG] Timer freezes during heavy scrolling
When this bug was fixed: https://github.com/Mijick/Timer/issues/3
This code was added in MTimerStateManager
func updateInternalTimerStartAddToRunLoop() {
#if os(macOS)
guard let internalTimer = internalTimer else { return }
RunLoop.main.add(internalTimer, forMode: .common)
#endif
}
I had an issue where very active scrolling on screen (iOS) would freeze the timer. When the scroll stopped, the timer would resume. Removed the platform check so that it would use .common for iOS and it works perfectly now:
func updateInternalTimerStartAddToRunLoop() {
guard let internalTimer = internalTimer else { return }
RunLoop.main.add(internalTimer, forMode: .common)
}
Not sure if it's worth updating this. For me it was super helpful. Thanks for the library, it's been great to work with.