• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: System Idle Time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Idle Time


  • Subject: Re: System Idle Time
  • From: Tom Harrington <email@hidden>
  • Date: Tue, 26 Oct 2004 17:51:45 -0600

On Tue, 26 Oct 2004 18:06:38 +0000, Mike Lewis <email@hidden> wrote:
> Hello,
>
> How can I get the system idle time in Cocoa? I want to know how long the
> user has been away from computer. I tried using a timer called
> EventLoopIdleTimer in Carbon, which works fine, but it only gives me the
> idle time of my application. I also read something about HIDIdleTime in the
> archives, but couldn't find any source code examples on how to use it.

In Cocoa? Beats me. But it can be done with IOKit and Core
Foundation. There's some example code doing this at
<http://archive.macosxlabs.org/tools_and_scripts/script_archive/scripts/idle/stanford_university/idler.html>.
For some reason they've got a JPG of the source instead of text, but
you'll get the idea.

--
Tom Harrington
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >System Idle Time (From: "Mike Lewis" <email@hidden>)

  • Prev by Date: Re: [ANN] Cocoa Style for ObjC: 1 and 2
  • Next by Date: Re: [Moderator] Re: Cocoa-Java and the Future
  • Previous by thread: Re: System Idle Time
  • Next by thread: Re: System Idle Time
  • Index(es):
    • Date
    • Thread