appnap

command
v0.6.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

appnap

Compare an ordinary Go ticker with one protected by an NSProcessInfo.beginActivity(options:reason:) activity:

go run ./examples/foundation/appnap
go run ./examples/foundation/appnap -protect

Leave the Mac idle and compare the reported intervals. The example is an observation tool, not a timing guarantee; scheduler load and power policy still affect both processes.

Documentation

Overview

Command appnap shows the effect of an NSProcessInfo activity on a timer.

Run two copies, one with -protect and one without, then leave the Mac idle. The protected copy asks macOS not to App Nap the ticker while the unprotected copy is an intentionally ordinary background process.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL