Reputation: 54281
I'm creating a daemon that will be installed in the LaunchAgents folder. Some questions about making it sleep:
Basically my app needs to sleep when the computer sleeps. What is the best way to make this happen in C or Cocoa?
Thanks!
Upvotes: 1
Views: 238
Reputation: 54049
You may find good answers on this question:
What happens to my app when my Mac goes to sleep?
Basically, the execution of your app will be freezed when the computer goes into sleep mode. It's automatically resumed when the computer wakes-up...
Upvotes: 1