mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-12 01:25:55 +00:00
Fix overflow on nanoseconds which was causing issues on some platforms.
This commit is contained in:
parent
633e4cdc60
commit
21b63f56ff
@ -215,7 +215,7 @@ public:
|
||||
clock_gettime(CLOCK_REALTIME, &timeout);
|
||||
#endif
|
||||
timeout.tv_sec += milliseconds / 1000;
|
||||
timeout.tv_nsec += milliseconds * 1000000;
|
||||
timeout.tv_nsec += (milliseconds % 1000) * 1000000;
|
||||
pthread_mutex_lock(&mtx.native_handle());
|
||||
pthread_cond_timedwait(&event_, &mtx.native_handle(), &timeout);
|
||||
pthread_mutex_unlock(&mtx.native_handle());
|
||||
@ -321,7 +321,7 @@ public:
|
||||
clock_gettime(CLOCK_REALTIME, &timeout);
|
||||
#endif
|
||||
timeout.tv_sec += milliseconds / 1000;
|
||||
timeout.tv_nsec += milliseconds * 1000000;
|
||||
timeout.tv_nsec += (milliseconds % 1000) * 1000000;
|
||||
pthread_cond_timedwait(&event_, &mtx.native_handle(), &timeout);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user