Re: "Kicking" the screensaver/display timers
Re: "Kicking" the screensaver/display timers
- Subject: Re: "Kicking" the screensaver/display timers
- From: Terry Lambert <email@hidden>
- Date: Tue, 22 Jul 2008 21:19:09 -0700
On Jul 21, 2008, at 5:26 PM, Steve Checkoway wrote:
On Jul 21, 2008, at 1:47 PM, Ethan Bold wrote:
Until now, UpdateSystemActivity() was the only game in town, but
please don't use it anymore! We've got a better alternative.
IOPMAssertionCreateWithName() doesn't seem to exist anywhere (google
knows nothing about it). IOPMAssertionCreate() doesn't seem to exist
in pre-10.5 and since I see no need to restrict to 10.5, that
doesn't work for me.
* Prefer IOPMAssertionCreateWithName(), which lets you pass a
string describing the purpose of the assertion (for debugging &
diagnostic use for Apple & yourself) over the vanilla
IOPMASsertionCreate. If you invoke IOPMAssertionCreate from
multiple points in your code; naming the assertions differently
will help identify leaks.
As I said, IOPMAssertionCreateWithName() doesn't seem to exist.
Xcode doesn't know about it, google doesn't know about it, I can't
find it on my system:
$ find /System/Library/Frameworks -name '*.h' -print0|xargs -0 grep
IOPMAssertionCreateWithName
prints nothing.
Try IOPMAssertionCreate(); it's defined in the 10.4 and 10.5 SDK in
IOKit.framework/Versions/A/Headers/pwr_mgt/IOPMLib.h. I think 10.4
was the first place it was published as non-private.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden