mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
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
This commit is contained in:
parent
ca5ed93fde
commit
daf78764e5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user