From 510e7d0d869dcc008b1e11e21961f2c1c3cb9cd3 Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Tue, 26 Dec 2017 22:10:52 -0600 Subject: [PATCH] os: Always return microseconds from GetTimeInMicros() When a monotonic clock is not available, GetTimeInMicros() returns the time in nanoseconds. Instead, return the time in microseconds, as the name indicates. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson --- os/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/utils.c b/os/utils.c index 8a758f0b9..4a8d1249f 100644 --- a/os/utils.c +++ b/os/utils.c @@ -497,7 +497,7 @@ GetTimeInMicros(void) #endif X_GETTIMEOFDAY(&tv); - return (CARD64) tv.tv_sec * (CARD64)1000000000 + (CARD64) tv.tv_usec * 1000; + return (CARD64) tv.tv_sec * (CARD64)1000000 + (CARD64) tv.tv_usec; } #endif