From f34d75d6f69f4c0bf391e0adf1fd469601b01b04 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 3 Mar 2014 14:53:30 +0000 Subject: [PATCH] c11/threads: Fix nano to milisecond conversion. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Per https://gist.github.com/yohhoy/2223710/#comment-710118 Cc: "10.0" "10.1" Reviewed-by: Brian Paul Reviewed-by: Michel Dänzer --- 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 be1a3895727..771db9460fb 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 -- 2.30.2