This method will calculate the time it took from its last call in milliseconds:
GetDeltaTime. It will return an
deltaTimeas the result of a call to
deltaTime = Millisecs() - lastTime
lastTime += deltaTime
deltaTimeand close the method.
Return deltaTime End
To calculate how long it took between two update processes, we created a method that will do just that. Determine the current time in milliseconds, and calculate how long it took from the last time this method was called. The result will be used to determine a speed factor ...