Hi,
I am trying to use SDL_GetTicks()
to get the current time since SDL initialisation by storing it in a variable that is updated in the Game Loop draw()
function. It acts strangely and I don’t know exactly why. (I am using VS2015)
The variable CurrentTime
(data type uint32) stores the GetTicks(); value, divided by 1000 (to get seconds). I have it stored in the Watch tab.
When I first launch the debugger and then break all after, say, 5 seconds, the variable counts correctly and displays 5s in the Watch tab. However, if I then continue, and then break all again, The value seems to have incremented 10-fold over the same time period.
Is there a reason why this happens?
Thanks