From 4e668fdd5b5da0d46f97d835249dbe5f0ea319a7 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 19 Oct 2017 15:16:25 -0700 Subject: fixes #84 Consider using msec for durations There is now a public nng_duration type. We have also updated the zerotier work to work with the signed int64_t's that the latst ZeroTier dev branch is using. --- src/platform/windows/win_thread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/platform/windows/win_thread.c') diff --git a/src/platform/windows/win_thread.c b/src/platform/windows/win_thread.c index 41ba721c..0d9e7387 100644 --- a/src/platform/windows/win_thread.c +++ b/src/platform/windows/win_thread.c @@ -91,8 +91,7 @@ nni_plat_cv_until(nni_plat_cv *cv, nni_time until) if (now > until) { msec = 0; } else { - // times are in usec, but win32 wants millis - msec = (DWORD)(((until - now) + 999) / 1000); + msec = (DWORD)(until - now); } ok = SleepConditionVariableSRW(&cv->cv, cv->srl, msec, 0); -- cgit v1.2.3-70-g09d2