Take a new step => update the timer by adding the timeStep value to the current time
| 149 | |
| 150 | // Take a new step => update the timer by adding the timeStep value to the current time |
| 151 | inline void Timer::nextStep(std::chrono::duration<double> timeStep) { |
| 152 | assert(mIsRunning); |
| 153 | |
| 154 | // Update the accumulator value |
| 155 | mAccumulator -= timeStep; |
| 156 | } |
| 157 | |
| 158 | // Compute the interpolation factor |
| 159 | inline float Timer::computeInterpolationFactor(std::chrono::duration<double> timeStep) { |