| 49 | } |
| 50 | |
| 51 | double GameTime::getCurrentTime() { |
| 52 | const Uint64 frequency = SDL_GetPerformanceFrequency(); |
| 53 | const Uint64 counter = SDL_GetPerformanceCounter(); |
| 54 | return static_cast<double>(counter) / static_cast<double>(frequency); |
| 55 | } |
| 56 | |
| 57 | double GameTime::getCurrentMilliseconds() { return getCurrentTime() * 1000.0; } |
| 58 |