Open
Description
After 49 days of running, millis() wraps and SimpleTimer logic will be broken (will fire at wrong time).
Check for this condition is needed.
for example:
if (current_millis - prev_millis[i] >= delays[i]) {
if:
prev_millis[0] == 4,294,967,290 (just 5 mills from wrap over)
current_millis == 1 (just after wrap over)
"if" statement above will be satisfied for almost any delays[0] value.
this will lead to timer being fired pre-maturely
Metadata
Metadata
Assignees
Labels
No labels