mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Mac intel and arm64 timer change proposal.
This commit is contained in:
parent
e88fad00a5
commit
2932a835fc
@ -177,7 +177,7 @@ retro_perf_tick_t cpu_features_get_perf_counter(void)
|
||||
time_ticks = gettime();
|
||||
#elif !defined(__MACH__) && (defined(_XBOX360) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__) || defined(__PSL1GHT__) || defined(__PPC64__) || defined(__powerpc64__))
|
||||
time_ticks = __mftb();
|
||||
#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(__QNX__) || defined(ANDROID) || defined(__MACH__)
|
||||
#elif (defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK > 0) || defined(__QNX__) || defined(ANDROID)
|
||||
struct timespec tv = {0};
|
||||
if (ra_clock_gettime(CLOCK_MONOTONIC, &tv) == 0)
|
||||
time_ticks = (retro_perf_tick_t)tv.tv_sec * 1000000000 +
|
||||
@ -191,6 +191,8 @@ retro_perf_tick_t cpu_features_get_perf_counter(void)
|
||||
time_ticks = (retro_perf_tick_t)a | ((retro_perf_tick_t)d << 32);
|
||||
#elif defined(__ARM_ARCH_6__)
|
||||
__asm__ volatile( "mrc p15, 0, %0, c9, c13, 0" : "=r"(time_ticks) );
|
||||
#elif defined(__aarch64__)
|
||||
__asm__ volatile( "mrs %0, cntvct_el0" : "=r"(time_ticks) );
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
time_ticks = sceKernelGetSystemTimeWide();
|
||||
#elif defined(PS2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user