Expire timers on expiry time too, not just after.

This commit is contained in:
Ove Kaaven 1999-05-22 15:56:21 +00:00 committed by Alexandre Julliard
parent 2305f3c06d
commit 3d93102dd4
1 changed files with 3 additions and 1 deletions

View File

@ -107,7 +107,9 @@ static DWORD CALLBACK SERVICE_Loop( SERVICETABLE *service )
}
if ( s->flags & SERVICE_USE_TIMEOUT )
if ( timercmp( &s->expire, &curTime, < ) )
if ((s->expire.tv_sec < curTime.tv_sec) ||
((s->expire.tv_sec == curTime.tv_sec) &&
(s->expire.tv_usec <= curTime.tv_usec)))
{
SERVICE_AddTimeval( &s->expire, s->rate );
callback = s->callback;