text: System Inactivity807590 Feb 20, 2006 12:34 AM
  I read at this forum sometime ago the methodology for detecting application inactivity period(that is the period within which your application did not receive user events) with a view to trigger another event.
  please assist with the method for implemeting this as i lost that code
  please assist with the method for implemeting this as i lost that code
  This content has been marked as final. Show 9 replies
  1. Re: System Inactivity807590 Feb 20, 2006 12:45 AM (in response to 807590)
  public class watcher implements Runnable { long time; public void run() { time = System.currentTimeMillis(); while (true) { sleep(MYTIMEOUT); if (System.currentTimeMiliis() >= (time + MYTIMEOUT)) { //user is away } } } public synchronized void event(AWTEvent ev) { time = ev.getWhen(); } }
  2. Re: System Inactivity807590 Feb 20, 2006 1:18 AM (in response to 807590)thanks a million for the the timely response. ill try the code and revert.
  more grease to your elbow
  3. Re: System Inactivity807592 Oct 16, 2007 10:51 AM (in response to 807590)I have posted an entry on my blog in which I offer some code that leverages the JNA (Java Native Access : see) library to get the idle time on Windows.
  Hope it helps...
  4. Re: System Inactivity807592 Oct 16, 2007 12:48 PM (in response to 807592)Is the 'z' for "zombie"?
  5. Re: System Inactivity807592 Oct 16, 2007 1:52 PM (in response to 807592)Well, the 'z' comes from a family private joke that only makes sense in french : "Chez Olive" means "(At) Olive's" and when you pronounce it there is a 'z'-y sound to make the link between the 'z' (which is not pronounced in the word 'chez' when isolated or in front of a word that doesn't start with a vowel) and the 'O'. This often makes children think that the 'z' is part of the word that follows...
  6. Re: System Inactivity796447 Oct 16, 2007 1:54 PM (in response to 807592)Well, to us we'll just think of the 'z' meaning 'zombie', because that's what you're all about - resurrecting zombie threads (some as old as 6 years ago) to post a link to your precious little blog.
  7. Re: System Inactivity807592 Oct 16, 2007 2:14 PM (in response to 796447)Haha ! As we say in french, "Le ridicule ne tue pas", and "Ce qui ne tue pas renforce" ("Ridiculousness doesn't kill", and "What doesn't kill you makes you stronger")... I guess I'm just stronger now :-D
  Thanks for the explanation !
  8. Re: System Inactivity796440 Oct 16, 2007 2:17 PM (in response to 807592)So, your criteria for doing something is not whether it's valuable or useful, but merely that it doesn't kill you?
  9. Re: System Inactivity807592 Oct 16, 2007 2:33 PM (in response to 807592)Olive,
  Vous pouvez embrasser mon �ne.
  Sinc�rement,
  cotton
  PS J'ai rapport� l'abus sur vous.