Received: from eggs.gnu.org ([2001:4830:134:3::10]:48784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGSCG-0008Pn-SN for qemu-devel@nongnu.org; Mon, 02 Sep 2013 07:21:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGSCB-0003EP-6f for qemu-devel@nongnu.org; Mon, 02 Sep 2013 07:21:28 -0400 From: Michael Tokarev Date: Mon, 2 Sep 2013 15:01:35 +0400 Message-Id: <1378119695-14568-16-git-send-email-mjt@msgid.tls.msk.ru> In-Reply-To: <1378119695-14568-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1378119695-14568-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: [Qemu-devel] [PULL 15/15] aio / timers: use g_usleep() not sleep() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: qemu-trivial@nongnu.org, Michael Tokarev , qemu-devel@nongnu.org, Alex Bligh From: Alex Bligh sleep() apparently doesn't exist under mingw. Use g_usleep for portability. Signed-off-by: Alex Bligh Reviewed-by: Stefan Weil Signed-off-by: Michael Tokarev --- tests/test-aio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-aio.c b/tests/test-aio.c index 07a1f61..532a1de 100644 --- a/tests/test-aio.c +++ b/tests/test-aio.c @@ -396,7 +396,7 @@ static void test_timer_schedule(void) g_assert(!aio_poll(ctx, false)); g_assert_cmpint(data.n, ==, 0); - sleep(1); + g_usleep(1 * G_USEC_PER_SEC); g_assert_cmpint(data.n, ==, 0); g_assert(aio_poll(ctx, false)); @@ -729,7 +729,7 @@ static void test_source_timer_schedule(void) g_assert_cmpint(data.n, ==, 0); - sleep(1); + g_usleep(1 * G_USEC_PER_SEC); g_assert_cmpint(data.n, ==, 0); g_assert(g_main_context_iteration(NULL, false)); @@ -739,7 +739,7 @@ static void test_source_timer_schedule(void) do { g_assert(g_main_context_iteration(NULL, true)); } while (qemu_clock_get_ns(data.clock_type) <= expiry); - sleep(1); + g_usleep(1 * G_USEC_PER_SEC); g_main_context_iteration(NULL, false); g_assert_cmpint(data.n, ==, 2); -- 1.7.10.4