lihaoyun6 / AirBattery

Get the battery usage of all your devices on your Mac and put them on the Dock / Menu Bar / Widget! && 在Mac上获取你所有设备的电量信息并显示在Dock / 状态栏 / 小组件上!
https://lihaoyun6.github.io/airbattery/
GNU Affero General Public License v3.0
922 stars 27 forks source link

Lag on updating the widget #34

Closed Alrazzouq closed 1 month ago

Alrazzouq commented 1 month ago

The widget update is the best of any apps I have used. However, still there is mild lag between it and the system widget, even I use "system" for "Update Interval". It should be perfect especially this is for the same device which the application installed on, not a connected device. Screenshot 2024-06-07 at 7 24 43 PM

lihaoyun6 commented 1 month ago

Apple does not refresh all widgets at the same time. Each widget has its own independent "timeline". In fact, users cannot precisely control the refresh time of any widget. We can only submit refresh requests, but when they are executed is still determined by macOS.
Even different widgets created by the same App cannot be refreshed at the exact same time, there will always be a delay of several seconds.

lihaoyun6 commented 1 month ago

Setting the widget update interval to "system" does not mean that it will be refreshed at the same time as other widgets. This option just means that AirBattery will not actively submit refresh requests, and it is entirely up to the system to decide when to refresh.
Even if two widgets have the same update interval, they may not update at the same time because their timelines may be misaligned

Alrazzouq commented 1 month ago

Thank you for the clarification.