Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How to read a file after a certain interval continuously

by muba (Priest)
on Feb 08, 2013 at 09:35 UTC ( #1017782=note: print w/replies, xml ) Need Help??


in reply to How to read a file after a certain interval continuously

One of many approaches would be to do it like this:

my $interval = 60 * 5 # seconds * minutes my $run_when = time + $interval; while (1) { # ... if (time - $run_when <= 0) { do_the_stuff; $run_when = time + $interval; } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017782]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2017-06-25 08:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (565 votes). Check out past polls.