News for hackers. Stuff that matters.
Re:How macOS manages M1 CPU cores by jamesfmilne on Monday April 25, 2022 @04:13PM (#31159947)
This is how you do it from Objective-C:

  // Call NSProcessInfo to disable AppNap et al.
  NSActivityOptions activityOptions =
      NSActivityIdleDisplaySleepDisabled |
      NSActivityIdleSystemSleepDisabled |
      NSActivityLatencyCritical;

  NSProcessInfo* procInfo = [NSProcessInfo processInfo];
  m_NoSleepActivity = [procInfo beginActivityWithOptions:activityOptions reason:@"Running some stuff"];

There are no comments on this comment yet.