From 4f8049377beba6d4182018ff022c658c53b38675 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Tue, 18 Jul 2006 03:53:21 +0000 Subject: [PATCH] The default ctor gets the time. Avoid that since we're setting it to the value of the timeval. --- stepmania/src/arch/Threads/Threads_Pthreads.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stepmania/src/arch/Threads/Threads_Pthreads.cpp b/stepmania/src/arch/Threads/Threads_Pthreads.cpp index 6caea813fe..20ba240fe3 100644 --- a/stepmania/src/arch/Threads/Threads_Pthreads.cpp +++ b/stepmania/src/arch/Threads/Threads_Pthreads.cpp @@ -332,9 +332,7 @@ bool EventImpl_Pthreads::Wait( RageTimer *pTimeout ) timeval tv; gettimeofday( &tv, NULL ); - RageTimer timeofday; - timeofday.m_secs = tv.tv_sec; - timeofday.m_us = tv.tv_usec; + RageTimer timeofday( tv.tv_sec, tv.tv_usec ); float fSecondsInFuture = -pTimeout->Ago(); timeofday += fSecondsInFuture; @@ -344,6 +342,7 @@ bool EventImpl_Pthreads::Wait( RageTimer *pTimeout ) } int iRet = pthread_cond_timedwait( &m_Cond, &m_pParent->mutex, &abstime ); + ASSERT( iRet != EINVAL ); return iRet != ETIMEDOUT; } #else