From 1b469124aa1f79269686492c391d54e43525ccf4 Mon Sep 17 00:00:00 2001 From: Bob van Loosen Date: Sat, 3 Mar 2012 17:36:28 +0100 Subject: [PATCH] fixed: struct timespec now values weren't set correctly on osx --- src/lib/platform/posix/os-threads.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/platform/posix/os-threads.h b/src/lib/platform/posix/os-threads.h index fc28fc9..8b56731 100644 --- a/src/lib/platform/posix/os-threads.h +++ b/src/lib/platform/posix/os-threads.h @@ -52,8 +52,8 @@ namespace PLATFORM #ifdef __APPLE__ struct timeval tv; gettimeofday(&tv, NULL); - now.tv_sec = tv.tv_sec + 0; - now.tv_nsec = 0; + now.tv_sec = tv.tv_sec; + now.tv_nsec = tv.tv_usec * 1000; #else clock_gettime(CLOCK_REALTIME, &now); #endif -- 2.34.1