Skip to content

Commit 56ab6cd

Browse files
committed
Add timer tolerance
1 parent afc78dd commit 56ab6cd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: MeetingBar/AppDelegate.swift

+2
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,13 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
181181

182182
private func scheduleFetchEvents() {
183183
let timer = Timer(timeInterval: 60, target: self, selector: #selector(fetchEvents), userInfo: nil, repeats: true)
184+
timer.tolerance = 3
184185
RunLoop.current.add(timer, forMode: .common)
185186
}
186187

187188
private func scheduleUpdateStatusBarItem() {
188189
let timer = Timer(timeInterval: 5, target: self, selector: #selector(updateStatusBarItem), userInfo: nil, repeats: true)
190+
timer.tolerance = 0.5
189191
RunLoop.current.add(timer, forMode: .common)
190192
}
191193

0 commit comments

Comments
 (0)