Skip to content

Commit

Permalink
Add timer tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
leits committed Jun 30, 2023
1 parent afc78dd commit 56ab6cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MeetingBar/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,13 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele

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

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

Expand Down

0 comments on commit 56ab6cd

Please sign in to comment.