MCPcopy Create free account
hub / github.com/atraczyk/2d-engine / getCurrentTime

Method getCurrentTime

engine/src/time.cpp:51–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51double 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
57double GameTime::getCurrentMilliseconds() { return getCurrentTime() * 1000.0; }
58

Callers 2

mainFunction · 0.80
P_runFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected