NSW: cpu_features_get_time_usec: put SWITCH block before POSIX_MONOTONIC_CLOCK block

This commit is contained in:
misson20000 2018-03-05 20:23:49 -08:00
parent 7487d938b3
commit 22c95b31ea

View File

@ -219,6 +219,8 @@ retro_time_t cpu_features_get_time_usec(void)
return sys_time_get_system_time();
#elif defined(GEKKO)
return ticks_to_microsecs(gettime());
#elif defined(SWITCH)
return (svcGetSystemTick() * 10) / 192;
#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(__QNX__) || defined(ANDROID) || defined(__MACH__)
struct timespec tv = {0};
if (ra_clock_gettime(CLOCK_MONOTONIC, &tv) < 0)
@ -236,8 +238,6 @@ retro_time_t cpu_features_get_time_usec(void)
return sceKernelGetProcessTimeWide();
#elif defined(WIIU)
return ticks_to_us(OSGetSystemTime());
#elif defined(SWITCH)
return (svcGetSystemTick() * 10) / 192;
#else
#error "Your platform does not have a timer function implemented in cpu_features_get_time_usec(). Cannot continue."
#endif