love.timer.getTime() resets?
Posted: Wed Jan 04, 2023 11:35 am
So I've been programming a lot with the Love2D framework lately which is really nice to work with. However I was always afraid to start implementing timers in my programs with the love.timer.getTime() function, since it's described on the site as: "Returns the value of a precise timer with an unspecified starting time.". It's kinda straight foreward, but also a vague explaination. If it returns time from an unspecified starting point, does that also mean that at one point the timer can reset and return a new starting time? or will it always keep going?
I want to know this, because if I compare the difference in time, and it suddenly resets back to around 0, the comparison will be faulty.
Can anyone explain me how the inner mechanics of the timer work, and if it resets, and if yes, what to do about it.
I want to know this, because if I compare the difference in time, and it suddenly resets back to around 0, the comparison will be faulty.
Can anyone explain me how the inner mechanics of the timer work, and if it resets, and if yes, what to do about it.