In my project I need to switch between millis and micros delay depending on given timespan.
Instead of doing this in every loop
if (time < 1000) delayMicroseconds(…); else delay(…);
unsigned long = myDelay;
if (time < 1000) myDelay = delayMicroseconds; else myDelay = delay;
and then in loop I’d just call myDelay(…);
Is something like that possible?