in reply to Running subroutines at specific times
Seems like an event driven thing... but do you want the code in the various subs to run asynchronously? Can it possibly last more than the given amount of time? if so then you {c,sh}ould fork or use threads. Else you may be interested in alarm.
All in all seems more like stuff for cron. In perl, you may just have an infinite loop with a sleep 1 holding a counter. If, say, $counter % $interval == 0 then this will trigger the wanted action. Of course you can and probably want to have @interval or %interval instead of $interval.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Running subroutines at specific times
by stellagoddc (Novice) on May 11, 2006 at 16:56 UTC | |
|
Re^2: Running subroutines at specific times
by stellagoddc (Novice) on Apr 20, 2006 at 17:16 UTC |