Skip to contentSkip to conversation

UML - Fix usec to nsec conversion

PATCH New Jeff Dike 1 participant 1 message Sep 13, 2007 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 3/3 UML - Fix usec to nsec conversion

microseconds need to be multiplied by a thousand, not a billion, to get nanoseconds.

--

 arch/um/os-Linux/time.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/os-Linux/time.c +1 -1
Index: linux-2.6.22/arch/um/os-Linux/time.c
===================================================================
@@ -48,7 +48,7 @@ static inline unsigned long long tv_to_n
 	 */
 
 	return ((unsigned long long) tv->tv_sec) * UM_NSEC_PER_SEC +
-		tv->tv_usec * UM_NSEC_PER_SEC;
+		tv->tv_usec * UM_NSEC_PER_USEC;
 }
 
 unsigned long long disable_timer(void)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel