Delay Microseconds docs

I see that the delayMicroseconds doc no longer mention the bug of long delays being generated by a parameter of zero or a negative number.

I'll just repeat that a fix for this bug (one or two) lines exists and has been tested, and also seems to have absolutely no effect on timing. But as there seems to be no interest in fixing this - you might at least continue to document its ill effects.

Beginning coders using a variable in delayMicroseconds() could be forgiven for not understanding why their code is behaving bizarrely from the seemingly innocuous mistake of allowing a zero as a parameter in the function.


February 01, 2010, at 01:30 PM by David A. Mellis -
Changed lines 37-40 from:

To ensure more accurate delays, this functions disables interrupts during its operation, meaning that some things (like receiving serial data, or incrementing the value returned by millis()) will not happen during the delay. Thus, you should only use this function for short delays, and use delay() for longer ones.

delayMicroseconds(0) will generate a much longer delay than expected (~1020 us) as will using negative numbers as a parameter.

As of Arduino 0018, delayMicroseconds() no longer disables interrupts.