Closed sticilface closed 4 years ago
Nope. This is the intended behavior. https://github.com/arkhipenko/TaskScheduler/wiki/API-Task#void-setinterval-unsigned-long-ainterval
Please note that as a result execution of the tasks is delayed by the provided interval. If immediate invocation is required, call forceNextIteration() method after setting a new interval.
The dilemma is: what happens when you change the interval?
Makes sense?
https://github.com/arkhipenko/TaskScheduler/blob/c1e4e272db2587df38baa62974d0106c63219eeb/src/TaskScheduler.h#L593
I think this should only call
delay()
when the interval is actually changed? At the moment if you call it faster than the interval it is constantly pushed into the future and never executed?What do you think?