Fixed spaces

Former-commit-id: 2045fa2b37d3f0cbcd9d9d9cdcadb962ea07ecd0
This commit is contained in:
Lynix 2013-01-05 19:51:40 +01:00
parent e6198f6b3d
commit 62d238d236
1 changed files with 9 additions and 9 deletions

View File

@ -33,15 +33,15 @@ void NzConditionVariableImpl::Wait(NzMutexImpl* mutex)
bool NzConditionVariableImpl::Wait(NzMutexImpl* mutex, nzUInt32 timeout) bool NzConditionVariableImpl::Wait(NzMutexImpl* mutex, nzUInt32 timeout)
{ {
// get the current time // get the current time
timeval tv; timeval tv;
gettimeofday(&tv, NULL); gettimeofday(&tv, NULL);
// construct the time limit (current time + time to wait) // construct the time limit (current time + time to wait)
timespec ti; timespec ti;
ti.tv_nsec = (tv.tv_usec + (timeout % 1000)) * 1000000; ti.tv_nsec = (tv.tv_usec + (timeout % 1000)) * 1000000;
ti.tv_sec = tv.tv_sec + (timeout / 1000) + (ti.tv_nsec / 1000000000); ti.tv_sec = tv.tv_sec + (timeout / 1000) + (ti.tv_nsec / 1000000000);
ti.tv_nsec %= 1000000000; ti.tv_nsec %= 1000000000;
pthread_cond_timedwait(&m_cv,mutex, &tv); return pthread_cond_timedwait(&m_cv,mutex, &tv) != ETIMEDOUT;
} }