Commit 7319157d authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

quartz: Fix IReferenceClock::GetTime() implementation for system clock.

parent 9d436f69
......@@ -244,14 +244,11 @@ static HRESULT WINAPI SystemClockImpl_GetTime(IReferenceClock* iface, REFERENCE_
curTimeTickCount = GetTickCount();
EnterCriticalSection(&This->safe);
/** TODO: safe this not using * 10000 */
if (This->lastTimeTickCount == curTimeTickCount) hr = S_FALSE;
This->lastRefTime += (REFERENCE_TIME) (DWORD) (curTimeTickCount - This->lastTimeTickCount) * (REFERENCE_TIME) 10000;
This->lastTimeTickCount = curTimeTickCount;
LeaveCriticalSection(&This->safe);
*pTime = This->lastRefTime;
if (This->lastTimeTickCount == curTimeTickCount) hr = S_FALSE;
This->lastTimeTickCount = curTimeTickCount;
LeaveCriticalSection(&This->safe);
return hr;
}
......
......@@ -63,9 +63,7 @@ static void test_IReferenceClock_methods(const char * clockdesc, IReferenceClock
Sleep(1000); /* Sleep for at least 1 second */
hr = IReferenceClock_GetTime(pClock, &time2);
/* After a 1-second sleep, there is no excuse to get S_FALSE (see TODO above) */
todo_wine {
ok (hr == S_OK, "%s - Expected S_OK, got 0x%08x\n", clockdesc, hr);
}
/* FIXME: How much deviation should be allowed after a sleep? */
diff = time2 - time1;
......
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