diff --git a/libretro-common/features/features_cpu.c b/libretro-common/features/features_cpu.c index 98fc1de570..dec4df2e78 100644 --- a/libretro-common/features/features_cpu.c +++ b/libretro-common/features/features_cpu.c @@ -240,14 +240,14 @@ retro_time_t cpu_features_get_time_usec(void) return ticks_to_us(OSGetSystemTime()); #elif defined(SWITCH) || defined(HAVE_LIBNX) return (svcGetSystemTick() * 10) / 192; -#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(__QNX__) || defined(ANDROID) || defined(__MACH__) +#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(__QNX__) || defined(ANDROID) || defined(__MACH__) || defined(DJGPP) struct timespec tv = {0}; if (ra_clock_gettime(CLOCK_MONOTONIC, &tv) < 0) return 0; return tv.tv_sec * INT64_C(1000000) + (tv.tv_nsec + 500) / 1000; #elif defined(EMSCRIPTEN) return emscripten_get_now() * 1000; -#elif defined(PS2) || defined(DJGPP) +#elif defined(PS2) return clock()*(1000000LL/CLOCKS_PER_SEC); #elif defined(__mips__) struct timeval tv;