mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
initialize timespec variable
This commit is contained in:
parent
4a37c4e020
commit
7bb2e5f582
1 changed files with 1 additions and 1 deletions
|
@ -247,7 +247,7 @@ retro_time_t rarch_get_time_usec(void)
|
|||
#elif defined(GEKKO)
|
||||
return ticks_to_microsecs(gettime());
|
||||
#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(__QNX__) || defined(ANDROID) || defined(__MACH__)
|
||||
struct timespec tv;
|
||||
struct timespec tv = {0};
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &tv) < 0)
|
||||
return 0;
|
||||
return tv.tv_sec * INT64_C(1000000) + (tv.tv_nsec + 500) / 1000;
|
||||
|
|
Loading…
Add table
Reference in a new issue