I don’t see how the desired interval can be preserved at rollover.
for simplicity lets say rollover happens at 5,000,000. if your interval is millis-current<=threshold, current gets updated to the previous millis when the threshold is reached (and some event happens), it is getting to be a bigger and bigger number as we get closer to rollover time (both are).
just before rollover, millis goes from a huge number back down to zero before the threshold is reached.
after that the interval is tested as a very small millis minus a very large current (say 10 millis - 4,999,000 millis). won’t we crash ? won’t we be in negative numbers ? won’t the loop just go on forever with no more events taking place at the threshold ?
The note on this thread said it hadn’t been responded to in more than 120 days, and should i start a new topic. but if i did, i figure i would just get sent back to this thread with a suggestion to read what is already here.