use-timer icon indicating copy to clipboard operation
use-timer copied to clipboard

wrong time over calculation

Open lorraine98 opened this issue 3 years ago • 0 comments

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.

lorraine98 avatar Jul 14 '22 01:07 lorraine98