Open
Description
Summary
Time is expected to pass in the real world. In the mocked unit test environment, it doesn't. This means that otherwise-normal code will infinitely loop in tests
Arduino or Unit Test Code, Illustrating the Problem
while((millis() < wait_timer) && (!FLAG_ABORT_PENDING)) {
// waiting for random wait to finish
}
Proposed solution
Add a configurable delay (0 by default) to all system calls: millis()
most importantly, but also things like analogRead
and analogWrite
.