Timer countdown

Hi guys,

is there a way to get the time left before a timerCallback is triggered?

I would like to set a timer, then call something that would return me the elapsed time since the timer started, or the ms left until the callback gets triggered.


No, you’d have to do this manually. You could probably record the current time inside each timer callback. Then, when you want to find the time remaining before the next callback, you can compute it easily using the current time and the timer interval.

auto timeToCallback = getTimerInterval() - (getMillisecondCounter() - previousCallbackTime);

Thanks reuk