Closed kwrtz closed 4 years ago
It might be a bit confusing but is correct. iPreviousMillis is always a point in time of the last start. So iPrevious + iDelay should be right after or equal to now, and another interval should put you in the future. If that next interval does not put you in the future, you know you are in the overrun situation.
In the first line you calculate the future when the task should run again. In iOverrun you add the interval again. Is that correct? Because now you have two times delay added.