Microsecond delay within task

richard_damon wrote on Wednesday, December 24, 2014:

There is nothing preventing you from using a delayMicroseconds() function like what is used in non-threaded programs (one that just spins on a counter).

I would be wary of disabling interrupts for this, as that will add the delay into the latency of ALL interrupts in the system, so unless this time delay is more important than the timing of all the other interrupts, I wouldn’t disable the interrupts.

Unless the delay is very many microseconds, you wouldn’t be able to shift to another task, and even that would require something to generate an interrupt at the end to force the switch back.