FROM : Sean McBride
DATE : Thu Jun 19 22:20:10 2008
If you can require 10.5, then don't use UpdateSystemActivity(), instead,
do this:
IOPMAssertionID assertionID ;
IOReturn err = IOPMAssertionCreate (
kIOPMAssertionTypeNoDisplaySleep,
kIOPMAssertionLevelOn,
&assertionID);
On 6/12/08 12:34 PM, Hank Heijink (Mailinglists) said:
>Look into UpdateSystemActivity(). It's in the CoreServices framework.
>If you call it with UsrActivity every 25 seconds or so, the display
>won't dim and the computer won't go to sleep (unless it's forced to.
>You can't prevent that).
>
>What is your app doing that you want to resort to something as drastic
>as preventing sleep? Someone might be able to suggest a better
>solution to your problem if you give more details.
>
>Hank
>
>On Jun 12, 2008, at 8:27 AM, Nick Rogers wrote:
>
>> Hi,
>> When the computer goes into sleep mode my app also seems to be
>> taking forever in doing the current task.
>> So how can I prevent the computer from going into sleep mode when my
>> app is running?
DATE : Thu Jun 19 22:20:10 2008
If you can require 10.5, then don't use UpdateSystemActivity(), instead,
do this:
IOPMAssertionID assertionID ;
IOReturn err = IOPMAssertionCreate (
kIOPMAssertionTypeNoDisplaySleep,
kIOPMAssertionLevelOn,
&assertionID);
On 6/12/08 12:34 PM, Hank Heijink (Mailinglists) said:
>Look into UpdateSystemActivity(). It's in the CoreServices framework.
>If you call it with UsrActivity every 25 seconds or so, the display
>won't dim and the computer won't go to sleep (unless it's forced to.
>You can't prevent that).
>
>What is your app doing that you want to resort to something as drastic
>as preventing sleep? Someone might be able to suggest a better
>solution to your problem if you give more details.
>
>Hank
>
>On Jun 12, 2008, at 8:27 AM, Nick Rogers wrote:
>
>> Hi,
>> When the computer goes into sleep mode my app also seems to be
>> taking forever in doing the current task.
>> So how can I prevent the computer from going into sleep mode when my
>> app is running?
| Related mails | Author | Date |
|---|---|---|
| Nick Rogers | Jun 12, 14:27 | |
| Hank Heijink (Mail… | Jun 12, 18:34 | |
| Sean McBride | Jun 19, 22:20 |






Cocoa mail archive

