From: Vadim Zeitlin Date: Thu, 1 Dec 2011 14:22:07 +0000 (+0000) Subject: Fix timeout used in POSIX implementation of wxCondition::WaitTimeout(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e60defcb943dcbbc15ad50059954778c161bda1f Fix timeout used in POSIX implementation of wxCondition::WaitTimeout(). The time passed to pthread_cond_timedwait() must be in UTC, not local time, but wxGetLocalTimeMillis() now really returns the time in local time zone so we must use wxGetUTCTimeMillis() instead. Closes #13707. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 46d18578b2..1e555050f1 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -475,7 +475,7 @@ wxCondError wxConditionInternal::Wait() wxCondError wxConditionInternal::WaitTimeout(unsigned long milliseconds) { - wxLongLong curtime = wxGetLocalTimeMillis(); + wxLongLong curtime = wxGetUTCTimeMillis(); curtime += milliseconds; wxLongLong temp = curtime / 1000; int sec = temp.GetLo();