Commit 0df0f1fd authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Teached TIMER_GetNextExpiration that a timer that has already expired

(but not processed yet) HAS already expired...
parent 538d4c8f
......@@ -195,10 +195,17 @@ static void TIMER_RestartTimer( TIMER * pTimer, DWORD curTime )
*/
LONG TIMER_GetNextExpiration(void)
{
TIMER *pTimer;
LONG retValue;
EnterCriticalSection( &csTimer );
retValue = pNextTimer ? EXPIRE_TIME( pNextTimer, GetTickCount() ) : -1;
pTimer = pNextTimer;
while (pTimer && !pTimer->expires) /* Skip already expired timers */
pTimer = pTimer->next;
retValue = pTimer ? EXPIRE_TIME( pTimer, GetTickCount() ) : -1;
LeaveCriticalSection( &csTimer );
return retValue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment