From 4369b3dbceb567f6f4b036ab21d2ad0e92d10997 Mon Sep 17 00:00:00 2001 From: ToadKing Date: Thu, 7 Nov 2013 21:58:59 -0500 Subject: [PATCH] [PS3] fix scond_wait_timeout --- thread.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/thread.c b/thread.c index 21e21d93e6..b34e5757c5 100644 --- a/thread.c +++ b/thread.c @@ -329,20 +329,17 @@ bool scond_wait_timeout(scond_t *cond, slock_t *lock, int64_t timeout_us) sys_time_sec_t s; sys_time_nsec_t n; sys_time_get_current_time(&s, &n); + now.tv_sec = s; + now.tv_nsec = n; #elif !defined(GEKKO) // timeout on libogc is duration, not end time clock_gettime(CLOCK_REALTIME, &now); #endif -#if defined(__CELLOS_LV2__) - now.tv_sec = s; - now.tv_nsec = n; -#else now.tv_sec += timeout_us / 1000000LL; now.tv_nsec += timeout_us * 1000LL; now.tv_sec += now.tv_nsec / 1000000000LL; now.tv_nsec = now.tv_nsec % 1000000000LL; -#endif int ret = pthread_cond_timedwait(&cond->cond, &lock->lock, &now); return ret == 0;