[glib] gthread-win32: update for g_get_monotonic_time() changes



commit daf78764e5e142ea0c787e5f3f22e5bee4417883
Author: Dan Winship <danw gnome org>
Date:   Fri Feb 3 12:14:06 2012 -0500

    gthread-win32: update for g_get_monotonic_time() changes
    
    g_cond_wait_until() was calling GetSystemTimeAsFileTime() to get the
    current time, which is no longer what g_get_monotonic_time() returns.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669329

 glib/gthread-win32.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
index 94a56e2..5a9ac97 100644
--- a/glib/gthread-win32.c
+++ b/glib/gthread-win32.c
@@ -307,16 +307,8 @@ g_cond_wait_until (GCond  *cond,
                    gint64  end_time)
 {
   gint64 span;
-  FILETIME ft;
-  gint64 now;
 
-  GetSystemTimeAsFileTime (&ft);
-  memmove (&now, &ft, sizeof (FILETIME));
-
-  now -= G_GINT64_CONSTANT (116444736000000000);
-  now /= 10;
-
-  span = end_time - now;
+  span = end_time - g_get_monotonic_time ();
 
   if G_UNLIKELY (span < 0)
     span = 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]