Fixed some bogus infinite expiration time.
This commit is contained in:
parent
a4dd6a6af1
commit
96c142b940
|
@ -207,9 +207,14 @@ LONG TIMER_GetNextExpiration(void)
|
||||||
while (pTimer && !pTimer->expires) /* Skip already expired timers */
|
while (pTimer && !pTimer->expires) /* Skip already expired timers */
|
||||||
pTimer = pTimer->next;
|
pTimer = pTimer->next;
|
||||||
|
|
||||||
retValue = pTimer ? EXPIRE_TIME( pTimer, GetTickCount() ) : -1;
|
if (pTimer)
|
||||||
LeaveCriticalSection( &csTimer );
|
{
|
||||||
|
DWORD now = GetTickCount();
|
||||||
|
retValue = (pTimer->expires <= now) ? 0 : (pTimer->expires - now);
|
||||||
|
}
|
||||||
|
else retValue = -1;
|
||||||
|
|
||||||
|
LeaveCriticalSection( &csTimer );
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue