sdlGetPerformanceCounter function
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.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.1.3.
\sa SDL_GetPerformanceFrequency
extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void)
Implementation
int sdlGetPerformanceCounter() {
final sdlGetPerformanceCounterLookupFunction =
libSdl3.lookupFunction<Uint64 Function(), int Function()>(
'SDL_GetPerformanceCounter');
return sdlGetPerformanceCounterLookupFunction();
}