Menu

#2 Timers

closed
nobody
None
5
2002-11-14
2002-08-20
Anonymous
No

Not too sure if they are there already, but timers would
be a nice feature. So after a certain amount of time a
specified 'sub' will be run.

If the already exist... where? and can i have an
example?

thanks
shiver

Discussion

  • Andrew Burke

    Andrew Burke - 2002-11-14

    Logged In: YES
    user_id=9937

    You want the 'schedule' method, as far as I know it's
    undocumented, but there and functional. Ex:

    $self->connection->schedule(10, sub { $self->askquestion() });

    Would run the code supplied after 10 seconds.

     
  • Andrew Burke

    Andrew Burke - 2002-11-14
    • status: open --> closed
     

Log in to post a comment.