Re: Notification for Idle Time?
Re: Notification for Idle Time?
- Subject: Re: Notification for Idle Time?
- From: Gregory Weston <email@hidden>
- Date: Tue, 11 Dec 2007 14:06:39 -0500
On Dec 11, 2007, at 1:24 PM, Christopher Hickman wrote:
On Tuesday, December 11, 2007, at 06:23AM, "Gregory Weston"
<email@hidden> wrote:
Not an NSNotification.
InstallEventLoopIdleTimer
<http://developer.apple.com/documentation/Carbon/Conceptual/
Carbon_Event_Manager/Tasks/chapter_3_section_11.html>
<http://developer.apple.com/documentation/Carbon/Reference/
Carbon_Event_Manager_Ref/Reference/reference.html#//apple_ref/c/func/
InstallEventLoopIdleTimer>
Does anybody know if it is possible to get an EventLoopRef from my
NSApplication's run loop? Greg found something that does exactly
what I need, but it requires that I specify the run loop "the
Carbon way" as an EventLoopRef. I just don't know how to reference
my application's run loop as a Carbon EventLoopRef.
GetMainEventLoop() will work as the first argument.
But I've realized that InstallEventLoopIdleTimer probably won't do
what you're looking for, so please accept my apologies. IOKit looks
like it. Polling does suck, but if you poll with only the frequency
you need you can mitigate the horribleness somewhat. Like if you're
looking for 5 minutes of idle time, you might find it acceptable to
check only every 3 seconds or so - an error of 1%.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden