- Code:
// Test at UNO simulator
delay(1000); // around 16M cycle counts - almost correct
noInterrupts();
delay(1000); // around 92500 cycle counts ?!?
interrupts()
The value is never the same, though...
However, upper was quite a surprise! I'm not certain that is the bug in arduino code or simulator, though. Execution is 173 times faster when interrupts are disabled in simulator!