From a9cd33ac56d0556bbe4d722143f16bb792b953b2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 16 Jan 2021 23:54:31 +0100 Subject: [PATCH] Revert "Experiment on Apple" This reverts commit 8769866290e8245916250bb5d98f6538728c53f3. --- libretro-common/include/retro_timers.h | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/libretro-common/include/retro_timers.h b/libretro-common/include/retro_timers.h index 0ca441f5b7..07003801c4 100644 --- a/libretro-common/include/retro_timers.h +++ b/libretro-common/include/retro_timers.h @@ -95,31 +95,6 @@ static int nanosleepDOS(const struct timespec *rqtp, struct timespec *rmtp) #define retro_sleep(msec) (usleep(1000 * (msec))) #elif defined(WIIU) #define retro_sleep(msec) (OSSleepTicks(ms_to_ticks((msec)))) -#elif 0 -static INLINE void retro_sleep(unsigned msec) -{ - static struct mach_timebase_info s_Info; - static KBOOL s_fNanoseconds = K_UNKNOWN; - KU64 uNow = mach_absolute_time(); - KU64 uDeadline; - KU64 uPeriod; - - if (s_fNanoseconds == K_UNKNOWN) - { - if (mach_timebase_info(&s_Info)) - s_fNanoseconds = K_TRUE; /* the easy way out */ - else if (s_Info.denom == s_Info.numer) - s_fNanoseconds = K_TRUE; - else - s_fNanoseconds = K_FALSE; - } - - uPeriod = (KU64)msec * 1000 * 1000; - if (!s_fNanoseconds) - uPeriod = (double)uPeriod * s_Info.denom / s_Info.numer; /* Use double to avoid 32-bit trouble. */ - uDeadline = uNow + uPeriod; - mach_wait_until(uDeadline); -} #else #define retro_sleep(msec) \ { \