Do you use any engine? It could be because you use a constant delta value or you smooth the delta value.
Nope, I only use LWJGL, the delta I use is the one seen here
If time is 10*interval, you now have skipped 10 intervals.
Use a for loop
Sorry, I didn't get it, wouldn't this for-loop happen only once per call (since the time doesn't reset to 0)?
Lets say the game freezes for a couple of seconds and you application doesn't get enough CPU time. You get a temporary frame drop that and it takes much longer for your update routine to be called than usual.
Say your delta time was 5000 milliseconds and your interval is 1000 milliseconds. With your implementation,
We add 5000 to our time.
Is time >= 1000 ? Yes, so set time to zero, and move to the next frame - wait, what about those other 4000 seconds we totally discarded? Now we're four frames behind and we'll never catch up.
With my algorithm:
is 5000 > 1000? Yes, subtract 1000 from 5000, now it is 4000. Move to the next frame.
is 4000 > 1000 ? yes, subtract 1000 from 4000, now it is 3000, move to the next frame.