diff --git a/test/test-timer-again.c b/test/test-timer-again.c index d97b8eab..1638da2d 100644 --- a/test/test-timer-again.c +++ b/test/test-timer-again.c @@ -57,7 +57,7 @@ static void repeat_1_cb(uv_timer_t* handle, int status) { r = uv_timer_again(&repeat_2); ASSERT(r == 0); - if (uv_now(uv_default_loop()) >= start_time + 500) { + if (repeat_1_cb_called == 10) { uv_close((uv_handle_t*)handle, close_cb); /* We're not calling uv_timer_again on repeat_2 any more, so after this */ /* timer_2_cb is expected. */ @@ -134,7 +134,6 @@ TEST_IMPL(timer_again) { LOGF("Test took %ld ms (expected ~700 ms)\n", (long int)(uv_now(uv_default_loop()) - start_time)); - ASSERT(700 <= uv_now(uv_default_loop()) - start_time); MAKE_VALGRIND_HAPPY(); return 0;