CGEventSourceSecondsSinceLastEventType() is what you want. See here:
http://www.noodlesoft.com/blog/2008/01/08/idle-hands/


On May 10, 2010, at 1:26 PM, Marc Respass wrote:

> Hi All,
> 
> My application has a requirement that it "locks out" the user after X minutes 
> of inactivity. I was using Uli Kusterer's excellent UKIdleTimer in my 
> application and it worked great. Then I upgraded to 64-bit and it does not 
> work any more. Does anyone have a good replacement or is my best bet to just 
> go back to 32 bit? There are some new 10.6 event methods that I tried but 
> they are more the opposite of an idle timer. It lets me handle all kinds of 
> events but not "no event." I couldn't get that work well for me. If anyone 
> has a recommendation, I would really appreciate it.
> 
> Thanks a lot
> Marc
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/kainjow%40kainjow.com
> 
> This email sent to kain...@kainjow.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to