[PATCH 2/6] tests: Grant timer some time to run
- From: Ingo Brückl <ib wupperonline de>
- To: gtk-devel-list gnome org
- Subject: [PATCH 2/6] tests: Grant timer some time to run
- Date: Mon, 13 Jun 2016 16:35:36 +0200
Don't immediately query the timer, but let it run a while.
Signed-off-by: Ingo Brückl <ib wupperonline de>
---
glib/tests/timer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/glib/tests/timer.c b/glib/tests/timer.c
index cb9a268..18a762f 100644
--- a/glib/tests/timer.c
+++ b/glib/tests/timer.c
@@ -31,6 +31,7 @@ test_timer_basic (void)
gulong micros;
timer = g_timer_new ();
+ g_usleep (100);
elapsed = g_timer_elapsed (timer, µs);
@@ -47,6 +48,7 @@ test_timer_stop (void)
gdouble elapsed, elapsed2;
timer = g_timer_new ();
+ g_usleep (100);
g_timer_stop (timer);
--
2.8.2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]