-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
According to https://www.arduino.cc/reference/en/language/functions/time/millis/ the value returned by millis will overflow after about 50 days.
On this page:
https://playground.arduino.cc/Code/SimpleTimer
you state your algroythm is:
lastMillis = 0
forever do:
if (millis() - lastMillis > n)
call the particular piece of code
lastMillis = millis()
end
end
Which means that after millis overflows, millis() - lastMillis can never be greater than n since millis is now 0. This means that after 50 days any timers will simply stop running.
In my application I want a timer to run every 2 hours. Reading all the docs about this code it is not clear to me if this is true.
Can you edit your docs to either state that this library will not work after 50 days, or state that the library has code that will enable a regular timer to continue working.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels