quartz/tests: Relax system clock timing tests a bit.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bbf74ea22a
commit
ebf82cd686
|
@ -89,8 +89,8 @@ static void test_get_time(void)
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
hr = IReferenceClock_GetTime(clock, &time2);
|
hr = IReferenceClock_GetTime(clock, &time2);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
ok(time2 - time1 > 98 * 10000, "Expected about %s, but got %s.\n",
|
ok(time2 - time1 > 80 * 10000, "Expected about %s, but got %s.\n",
|
||||||
wine_dbgstr_longlong(time1 + 98 * 10000), wine_dbgstr_longlong(time2));
|
wine_dbgstr_longlong(time1 + 80 * 10000), wine_dbgstr_longlong(time2));
|
||||||
|
|
||||||
ref = IReferenceClock_Release(clock);
|
ref = IReferenceClock_Release(clock);
|
||||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||||
|
@ -160,11 +160,11 @@ static void test_advise(void)
|
||||||
|
|
||||||
hr = IReferenceClock_AdvisePeriodic(clock, current, 500 * 10000, (HSEMAPHORE)semaphore, &cookie);
|
hr = IReferenceClock_AdvisePeriodic(clock, current, 500 * 10000, (HSEMAPHORE)semaphore, &cookie);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
ok(!WaitForSingleObject(semaphore, 10), "Semaphore should be signaled.\n");
|
ok(!WaitForSingleObject(semaphore, 20), "Semaphore should be signaled.\n");
|
||||||
for (i = 0; i < 5; ++i)
|
for (i = 0; i < 5; ++i)
|
||||||
{
|
{
|
||||||
ok(WaitForSingleObject(semaphore, 480) == WAIT_TIMEOUT, "Semaphore should not be signaled.\n");
|
ok(WaitForSingleObject(semaphore, 460) == WAIT_TIMEOUT, "Semaphore should not be signaled.\n");
|
||||||
ok(!WaitForSingleObject(semaphore, 40), "Semaphore should be signaled.\n");
|
ok(!WaitForSingleObject(semaphore, 60), "Semaphore should be signaled.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IReferenceClock_Unadvise(clock, cookie);
|
hr = IReferenceClock_Unadvise(clock, cookie);
|
||||||
|
|
Loading…
Reference in New Issue