[PATCH 3/3] UML - Fix usec to nsec conversion

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: LKML <linux-kernel@...>, uml-devel <user-mode-linux-devel@...>
Date: Thursday, September 13, 2007 - 4:41 pm

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

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
 arch/um/os-Linux/time.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.22/arch/um/os-Linux/time.c
===================================================================
--- linux-2.6.22.orig/arch/um/os-Linux/time.c	2007-09-12 16:45:28.000000000 -0400
+++ linux-2.6.22/arch/um/os-Linux/time.c	2007-09-13 11:37:05.000000000 -0400
@@ -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)
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 3/3] UML - Fix usec to nsec conversion, Jeff Dike, (Thu Sep 13, 4:41 pm)