quartz: Reset the advise thread's timeout on each iteration.
Fixes a regression introduced by
63a6b308e9
. Because the timeout value was
always shrinked, it quickly went to 0 and then the entire advise thread
used 100% of a CPU core in applications such as Media Player Classic by
basically becoming a busy loop.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3772c620b0
commit
14435a6d31
|
@ -126,13 +126,14 @@ static DWORD WINAPI SystemClockAdviseThread(void *param)
|
|||
struct system_clock *clock = param;
|
||||
struct advise_sink *sink, *cursor;
|
||||
REFERENCE_TIME current_time;
|
||||
DWORD timeout = INFINITE;
|
||||
HANDLE handles[2] = {clock->stop_event, clock->notify_event};
|
||||
|
||||
TRACE("Starting advise thread for clock %p.\n", clock);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
DWORD timeout = INFINITE;
|
||||
|
||||
EnterCriticalSection(&clock->cs);
|
||||
|
||||
current_time = GetTickCount64() * 10000;
|
||||
|
|
Loading…
Reference in New Issue