From 0414bf0960ab7e5f9d7efbc51714e32d41b22bf9 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 19 Aug 2013 21:36:00 +1000 Subject: [PATCH] Quotient/remainder error in ms division. --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index 8186c1a4..0f64e030 100644 --- a/util.c +++ b/util.c @@ -915,7 +915,7 @@ void ms_to_timespec(struct timespec *spec, int64_t ms) lldiv_t tvdiv = lldiv(ms, 1000); spec->tv_sec = tvdiv.quot; - spec->tv_nsec = tvdiv.quot * 1000000; + spec->tv_nsec = tvdiv.rem * 1000000; } void timeraddspec(struct timespec *a, const struct timespec *b)