Commit 8c8237b7 authored by Alexandre Julliard's avatar Alexandre Julliard

Specify the service thread timers in ms instead of us.

parent 246c3606
......@@ -242,7 +242,7 @@ static LRESULT ANIMATE_Play(HWND hWnd, WPARAM wParam, LPARAM lParam)
} else {
TRACE("Using the service thread\n");
/* time is in s */
infoPtr->hService = SERVICE_AddTimer(infoPtr->mah.dwMicroSecPerFrame,
infoPtr->hService = SERVICE_AddTimer(infoPtr->mah.dwMicroSecPerFrame / 1000,
ANIMATE_ServiceCallback, (DWORD)infoPtr);
}
......
......@@ -150,7 +150,7 @@ static LPWINE_MM_IDATA MULTIMEDIA_MMTimeStart(void)
iData->mmSysTimeMS = GetTickCount();
iData->lpTimerList = NULL;
/* 10ms seems a reasonable value ?? */
iData->hMMTimer = SERVICE_AddTimer(10*1000L, TIME_MMSysTimeCallback, (DWORD)iData);
iData->hMMTimer = SERVICE_AddTimer(10, TIME_MMSysTimeCallback, (DWORD)iData);
}
return iData;
......
......@@ -82,7 +82,7 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth)
}
vga_refresh=0;
/* poll every 20ms (50fps should provide adequate responsiveness) */
VGA_InstallTimer(20000);
VGA_InstallTimer(20);
}
return 0;
}
......@@ -160,7 +160,7 @@ int VGA_SetAlphaMode(unsigned Xres,unsigned Yres)
if (lpddraw) VGA_Exit();
/* the xterm is slow, so refresh only every 200ms (5fps) */
VGA_InstallTimer(200000);
VGA_InstallTimer(200);
siz.X = Xres;
siz.Y = Yres;
......
......@@ -57,7 +57,7 @@ static void CALLBACK SYSTEM_TimerTick( ULONG_PTR arg )
static void SYSTEM_StartTicks(void)
{
if ( SYS_Service == INVALID_HANDLE_VALUE )
SYS_Service = SERVICE_AddTimer( SYS_TIMER_RATE, SYSTEM_TimerTick, 0L );
SYS_Service = SERVICE_AddTimer( (SYS_TIMER_RATE+500)/1000, SYSTEM_TimerTick, 0L );
}
......
......@@ -201,7 +201,6 @@ HANDLE SERVICE_AddTimer( LONG rate,
handle = CreateWaitableTimerA( NULL, FALSE, NULL );
if (!handle) return INVALID_HANDLE_VALUE;
rate = (rate + 500) / 1000; /* us -> ms */
if (!rate) rate = 1;
when.s.LowPart = when.s.HighPart = 0;
if (!SetWaitableTimer( handle, &when, rate, NULL, NULL, FALSE ))
......
......@@ -241,7 +241,7 @@ static UINT TIMER_SetTimer( HWND hwnd, UINT id, UINT timeout,
if (proc) WINPROC_SetProc( &pTimer->proc, proc, type, WIN_PROC_TIMER );
pTimer->expired = FALSE;
pTimer->hService = SERVICE_AddTimer( max( timeout * 1000L, SYS_TIMER_RATE ),
pTimer->hService = SERVICE_AddTimer( max( timeout, (SYS_TIMER_RATE+500)/1000 ),
TIMER_CheckTimer, (ULONG_PTR)pTimer );
TRACE("Timer added: %p, %04x, %04x, %04x, %08lx\n",
......
......@@ -167,7 +167,7 @@ BOOL X11DRV_EVENT_Init(void)
if ( Options.synchronous )
TSXSynchronize( display, True );
else
SERVICE_AddTimer( 200000L, EVENT_Flush, 0 );
SERVICE_AddTimer( 200, EVENT_Flush, 0 );
return TRUE;
}
......
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