in reply to Re^3: Pause Loop
in thread Pause Loop
unless I am overlooking something obvious, my sample code would run "stuff" at every hour, on the hour.
Well, except the first time, that would run inmediately, but that can be changed easily:
my $first = time; while (1) { # Do stuff here; my $next = int((time - $first + 3599)/3600) * 3600; sleep ($first + $next - time); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Pause Loop
by BrowserUk (Patriarch) on Apr 28, 2007 at 11:25 UTC |