3 ms·
The developer documentation goes into more details: > App Nap reduces power consumption by completely suspending your app’s execution when it meets certain cri
by masklinn 13y ago
The developer documentation goes into more details:
> App Nap reduces power consumption by completely suspending your app’s execution when it meets certain criteria. This ensures that your app does not periodically wake up to do unnecessary work. An app is considered to be a candidate for sleep if:
> * It is not visible—if all of an app’s windows are either hidden by other windows or minimized in a hidden dock, and the app is not in the foreground
> * It is not audible
> * It has not explicitly disabled automatic termination
> * It has not taken any power management assertions
> When all of these conditions are met, OS X may put the app to sleep. While asleep, the app is placed on a scheduling queue that rarely gets actual time on the CPU.
There are also new methods provided on NSProcessInfo to temporarily prevent sleep and increase scheduler timer precision.