gthread-win32: update for g_get_monotonic_time() changes
authorDan Winship <danw@gnome.org>
Fri, 3 Feb 2012 17:14:06 +0000 (12:14 -0500)
committerDan Winship <danw@gnome.org>
Thu, 9 Feb 2012 11:48:12 +0000 (06:48 -0500)
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

index 94a56e2..5a9ac97 100644 (file)
@@ -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;