mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
cpu_features_get_time_usec: Use monotonic_clock on djgpp
This commit is contained in:
parent
70c57beea9
commit
31d9fedf47
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user