Skip to content
Snippets Groups Projects
Commit 96c142b9 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard
Browse files

Fixed some bogus infinite expiration time.

parent a4dd6a6a
No related branches found
No related tags found
No related merge requests found
......@@ -207,9 +207,14 @@ LONG TIMER_GetNextExpiration(void)
while (pTimer && !pTimer->expires) /* Skip already expired timers */
pTimer = pTimer->next;
retValue = pTimer ? EXPIRE_TIME( pTimer, GetTickCount() ) : -1;
LeaveCriticalSection( &csTimer );
if (pTimer)
{
DWORD now = GetTickCount();
retValue = (pTimer->expires <= now) ? 0 : (pTimer->expires - now);
}
else retValue = -1;
LeaveCriticalSection( &csTimer );
return retValue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment