how to know that the process is idle ?

Discussion in 'Perl Misc' started by Nishant, Nov 18, 2008.

  1. Nishant

    Nishant Guest

    Hello All ,
    I have a Perl/Tk application. If the process is idle for say 10
    minutes (i.e, someone does not do anything to the application), the
    application should perform some action.
    Pls suggest how can this be done ?

    Best Regards
    Nishant Sharma
     
    Nishant, Nov 18, 2008
    #1
    1. Advertising

  2. Nishant <> writes:

    > I have a Perl/Tk application. If the process is idle for say 10
    > minutes (i.e, someone does not do anything to the application), the
    > application should perform some action.
    > Pls suggest how can this be done ?


    By setting an alarm with the alarm function (perldoc -f
    alarm). Remember to reset the alarm at the start of the event handler
    for each event.

    //Makholm
     
    Peter Makholm, Nov 18, 2008
    #2
    1. Advertising

  3. Nishant <> wrote:

    [ the same question as posted elsewhere ]


    Please do not multipost.

    Crosspost instead.


    --
    Tad McClellan
    email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
     
    Tad J McClellan, Nov 18, 2008
    #3
  4. Nishant <> wrote:
    >I have a Perl/Tk application. If the process is idle for say 10
    >minutes (i.e, someone does not do anything to the application), the
    >application should perform some action.
    >Pls suggest how can this be done ?


    perldoc -q timeout

    The slow event in this case is the user input.

    jue
     
    Jürgen Exner, Nov 18, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gordon Smith
    Replies:
    1
    Views:
    3,600
    Curt_C [MVP]
    Mar 1, 2005
  2. Kevin
    Replies:
    6
    Views:
    3,934
    Oliver Wong
    Feb 22, 2006
  3. George2

    system idle process

    George2, Jan 15, 2008, in forum: C++
    Replies:
    1
    Views:
    722
    Tim H
    Jan 15, 2008
  4. W. eWatson
    Replies:
    52
    Views:
    1,911
    MaxTheMouse
    Nov 26, 2011
  5. Andries

    I know, I know, I don't know

    Andries, Apr 23, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    279
    Gregory Toomey
    Apr 23, 2004
Loading...

Share This Page