Skip to content

Commit

Permalink
Set more energy efficient timer tolerance settings
Browse files Browse the repository at this point in the history
  • Loading branch information
leits committed Mar 20, 2024
1 parent 35e12f7 commit 1699acb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MeetingBar/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,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
timer.tolerance = 10
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
timer.tolerance = 1
RunLoop.current.add(timer, forMode: .common)
}

Expand Down

0 comments on commit 1699acb

Please sign in to comment.