The default ctor gets the time. Avoid that since we're setting it to the value of the timeval.

This commit is contained in:
Steve Checkoway
2006-07-18 03:53:21 +00:00
parent fbbdc5657a
commit 4f8049377b
@@ -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