9 Replies Latest reply on Oct 16, 2007 7:33 PM by 807592

    System Inactivity

      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
        • 1. Re: System Inactivity
          public class watcher implements  Runnable {
             long time;
             public void run() {
                 time = System.currentTimeMillis();
                 while (true) {
                    if (System.currentTimeMiliis() >= (time + MYTIMEOUT)) {
                      //user is away
             public synchronized void event(AWTEvent ev) {
                  time = ev.getWhen();
          • 2. Re: System Inactivity
            thanks a million for the the timely response. ill try the code and revert.

            more grease to your elbow
            • 3. Re: System Inactivity
              I have posted an entry on my blog in which I offer some code that leverages the JNA (Java Native Access : see http://jna.dev.java.net/) library to get the idle time on Windows.
              Hope it helps...
              • 4. Re: System Inactivity
                Is the 'z' for "zombie"?
                • 5. Re: System Inactivity
                  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 Inactivity
                    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 Inactivity
                      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 Inactivity
                        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 Inactivity

                          Vous pouvez embrasser mon �ne.



                          PS J'ai rapport� l'abus sur vous.