use-timer
use-timer copied to clipboard
wrong time over calculation
Hello thanks for making this libarary. But I have a question with calculating time over.
react_1.useEffect(function () {
if (status !== 'STOPPED' && time === endTime) {
dispatch({ type: 'stop' });
if (typeof onTimeOver === 'function') {
onTimeOver();
}
}
I think time >= endTime is more correct. I have to calc this with frame and ends with xx.000001 like this. Sometime it doesn't match corrrectly.
Thank you.