From c6076443aa2296a29a5aed6ada7ddb3891856048 Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Sun, 28 May 2017 17:49:36 -0400 Subject: [PATCH] Fix tv_usec calculation --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 0743aa1..eaf26b8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -851,7 +851,7 @@ impl Device { unsafe { clock_gettime(self.clock, &mut time); } let time = libc::timeval { tv_sec: time.tv_sec, - tv_usec: time.tv_nsec * 1000, + tv_usec: time.tv_nsec / 1000, }; if self.ty.contains(KEY) {