diff options
author | Tor Lillqvist <tml@novell.com> | 2006-07-24 12:42:18 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2006-07-24 12:42:18 +0000 |
commit | 94322b96dad9cf12fe28c6c33edd7f3b4c768bc9 (patch) | |
tree | 6332881243604d96dd6fad0ab0bd057a4963699c | |
parent | cc2aaddeb29139e95eea266162677176c4934b88 (diff) | |
download | glib-94322b96dad9cf12fe28c6c33edd7f3b4c768bc9.tar.gz |
Use g_get_current_time() insted of gettimeofday().
2006-07-24 Tor Lillqvist <tml@novell.com>
* tests/slice-test.c: Use g_get_current_time() insted of
gettimeofday().
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.pre-2-12 | 5 | ||||
-rw-r--r-- | tests/slice-test.c | 9 |
3 files changed, 14 insertions, 5 deletions
@@ -1,3 +1,8 @@ +2006-07-24 Tor Lillqvist <tml@novell.com> + + * tests/slice-test.c: Use g_get_current_time() insted of + gettimeofday(). + 2006-07-22 Matthias Clasen <mclasen@redhat.com> * configure.in: Bump version diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 1e5a7f3ff..df9aaf247 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2006-07-24 Tor Lillqvist <tml@novell.com> + + * tests/slice-test.c: Use g_get_current_time() insted of + gettimeofday(). + 2006-07-22 Matthias Clasen <mclasen@redhat.com> * configure.in: Bump version diff --git a/tests/slice-test.c b/tests/slice-test.c index 52d9572ad..e3e696222 100644 --- a/tests/slice-test.c +++ b/tests/slice-test.c @@ -20,7 +20,6 @@ #include <stdio.h> #include <string.h> -#include <sys/time.h> // gettimeofday #define quick_rand32() (rand_accu = 1664525 * rand_accu + 1013904223, rand_accu) static guint prime_size = 1021; // 769; // 509 @@ -80,8 +79,8 @@ test_memchunk_thread (gpointer data) rand_accu = *(guint32*) data; else { - struct timeval rand_tv; - gettimeofday (&rand_tv, NULL); + GTimeVal rand_tv; + g_get_current_time (&rand_tv); rand_accu = rand_tv.tv_usec + (rand_tv.tv_sec << 16); } @@ -141,8 +140,8 @@ test_sliced_mem_thread (gpointer data) rand_accu = *(guint32*) data; else { - struct timeval rand_tv; - gettimeofday (&rand_tv, NULL); + GTimeVal rand_tv; + g_get_current_time (&rand_tv); rand_accu = rand_tv.tv_usec + (rand_tv.tv_sec << 16); } |