perlpal has asked for the wisdom of the Perl Monks concerning the following question:
Im getting stuck at the while loop for obvious reasons being that $_current_time is relatively always lesser than $_new_time as the time() function updates both variables. i need the while loop to run only for the $_time_offset period. how could i better approach this. Thanks in Advance!$_current_time = time(); $_new_time = $_current_time + $_time_offset; while ($_current_time < $_new_time ){ execute_attack($random_rate); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: loop execution for "time" specified
by gwadej (Chaplain) on Mar 24, 2009 at 13:27 UTC | |
by perlpal (Scribe) on Mar 25, 2009 at 05:41 UTC | |
|
Re: loop execution for "time" specified
by Limbic~Region (Chancellor) on Mar 24, 2009 at 14:40 UTC | |
|
Re: loop execution for "time" specified
by MidLifeXis (Monsignor) on Mar 24, 2009 at 13:28 UTC |