|
@@ -101,7 +101,8 @@ Uint64 SDL_GetPerformanceCounter(void)
|
|
|
ticks *= SDL_NS_PER_SECOND;
|
|
ticks *= SDL_NS_PER_SECOND;
|
|
|
ticks += now.tv_nsec;
|
|
ticks += now.tv_nsec;
|
|
|
#elif defined(SDL_PLATFORM_APPLE)
|
|
#elif defined(SDL_PLATFORM_APPLE)
|
|
|
- ticks = mach_absolute_time();
|
|
|
|
|
|
|
+ // With HAVE_NANOSLEEP defined, time.h is included
|
|
|
|
|
+ ticks = clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
|
|
|
#else
|
|
#else
|
|
|
SDL_assert(false);
|
|
SDL_assert(false);
|
|
|
ticks = 0;
|
|
ticks = 0;
|