[Mesa-dev] [PATCH 1/3] c11: Fix nano to second conversion.

jfonseca at vmware.com jfonseca at vmware.com
Mon Mar 3 13:41:06 PST 2014


From: José Fonseca <jfonseca at vmware.com>

Per https://gist.github.com/yohhoy/2223710/#comment-710118
---
 include/c11/threads_win32.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/c11/threads_win32.h b/include/c11/threads_win32.h
index be1a389..771db94 100644
--- a/include/c11/threads_win32.h
+++ b/include/c11/threads_win32.h
@@ -146,7 +146,7 @@ static unsigned __stdcall impl_thrd_routine(void *p)
 
 static DWORD impl_xtime2msec(const xtime *xt)
 {
-    return (DWORD)((xt->sec * 1000u) + (xt->nsec / 1000));
+    return (DWORD)((xt->sec * 1000U) + (xt->nsec / 1000000L));
 }
 
 #ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE
-- 
1.8.5.3



More information about the mesa-dev mailing list