/**
* Schedules a timer to elapse in the future.
*
* @param delayMillis how long to wait before the timer elapses, in
* milliseconds
*/
public void schedule(int delayMillis) {
if (delayMillis <= 0) {
throw new IllegalArgumentException("must be positive");
}
...
I've always assumed that 0 wasn't portable and use 10 by convention.
Ideally, you'd want 0 to function like yield(), but I had a nagging
suspicious that some browsers might treat 0 as a NOP (that is, run the
code immediately without yielding)
Chrome: 4ms (fairly recent change)
Safari (mac): 10ms
Safari (win): 15ms
Firefox: 15ms (or 10ms if flash is running)
IE: 15ms
Opera: I have no clue.
So, that's just a really long way of saying that there is no danger in
allowing 0 and technically it is a perfectly legal value ... it's just
not very useful.
/kel
--
If you received this communication by mistake, you are entitled to one
free ice cream cone on me. Simply print out this email including all
relevant SMTP headers and present them at my desk to claim your creamy
treat. We'll have a laugh at my emailing incompetence, and play a game
of ping pong. (offer may not be valid in all States).