sdlGetPerformanceCounter function

int sdlGetPerformanceCounter()

Get the current value of the high resolution counter.

This function is typically used for profiling.

The counter values are only meaningful relative to each other. Differences between values can be converted to times by using SDL_GetPerformanceFrequency().

\returns the current counter value.

\since This function is available since SDL 2.0.0.

\sa SDL_GetPerformanceFrequency

extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void)

Implementation

int sdlGetPerformanceCounter() {
  final sdlGetPerformanceCounterLookupFunction =
      libSdl2.lookupFunction<Uint64 Function(), int Function()>(
          'SDL_GetPerformanceCounter');
  return sdlGetPerformanceCounterLookupFunction();
}