diff options
author | Alex Bligh <alex@alex.org.uk> | 2013-08-29 23:32:14 +0100 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2013-09-01 20:02:45 +0400 |
commit | fcdda211f9239f4218f96cdc336a482f7103d90b (patch) | |
tree | 7fa226d5449401cc8487142dcd6a445a8725263b /tests/test-aio.c | |
parent | 2b21fb57af305f17841d79e7e2e02ad1aec3f5ca (diff) |
aio / timers: use g_usleep() not sleep()
sleep() apparently doesn't exist under mingw. Use g_usleep for
portability.
Signed-off-by: Alex Bligh <alex@alex.org.uk>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'tests/test-aio.c')
-rw-r--r-- | tests/test-aio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-aio.c b/tests/test-aio.c index 07a1f61f87..532a1de3f9 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); |