c11/threads: Fix nano to milisecond conversion.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 3 Mar 2014 14:53:30 +0000 (14:53 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 4 Mar 2014 12:05:23 +0000 (12:05 +0000)
Per https://gist.github.com/yohhoy/2223710/#comment-710118

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
include/c11/threads_win32.h

index be1a3895727e1f8fd4b3e7732da70786c4e67ff4..771db9460fb17647357d521c8d13e78a7246c882 100644 (file)
@@ -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