summaryrefslogtreecommitdiff
path: root/gthread
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-01-15 03:36:08 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-01-15 03:36:08 +0000
commit73a581c8ba95d6e23fe5b64fe9ca9bbd3c4ade3f (patch)
tree267b919783495a861ef28118785cb5e5a833b08e /gthread
parentb7899ae84a43d5e34f0010676975a4952863cb39 (diff)
Correct the gettime calculations once more. (#395203, Chris Wilson)
2005-01-15 Matthias Clasen <mclasen@redhat.com> * glib/gthread.c: * gthread/gthread-posix.c: Correct the gettime calculations once more. (#395203, Chris Wilson) svn path=/branches/glib-2-12/; revision=5263
Diffstat (limited to 'gthread')
-rw-r--r--gthread/gthread-posix.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gthread/gthread-posix.c b/gthread/gthread-posix.c
index 124d452e1..711fcd3a7 100644
--- a/gthread/gthread-posix.c
+++ b/gthread/gthread-posix.c
@@ -429,7 +429,6 @@ g_thread_equal_posix_impl (gpointer thread1, gpointer thread2)
static guint64
g_gettime_posix_impl (void)
{
-#define G_NSEC_PER_SEC 100000000000
#ifdef USE_CLOCK_GETTIME
struct timespec tv;
@@ -441,7 +440,7 @@ g_gettime_posix_impl (void)
gettimeofday (&tv, NULL);
- return (guint64) tv.tv_sec * G_NSEC_PER_SEC + tv.tv_usec * 1000;
+ return (guint64) tv.tv_sec * G_NSEC_PER_SEC + tv.tv_usec * (G_NSEC_PER_SEC / G_USEC_PER_SEC);
#endif
}