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/posix/posix_thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/platform/posix/posix_thread.c') diff --git a/src/platform/posix/posix_thread.c b/src/platform/posix/posix_thread.c index 4278a057..115768dc 100644 --- a/src/platform/posix/posix_thread.c +++ b/src/platform/posix/posix_thread.c @@ -354,8 +354,8 @@ nni_plat_cv_until(nni_plat_cv *cv, nni_time until) NNI_ASSERT(cv->mtx->owner == pthread_self()); // Our caller has already guaranteed a sane value for until. - ts.tv_sec = until / 1000000; - ts.tv_nsec = (until % 1000000) * 1000; + ts.tv_sec = until / 1000; + ts.tv_nsec = (until % 1000) * 1000000; if (cv->fallback) { rv = nni_plat_cv_until_fallback(cv, &ts); -- cgit v1.2.3-70-g09d2