From 7a3b507be19570706b1237518fe7e7a824db7e68 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 24 Oct 2017 19:26:23 +0100 Subject: [PATCH] clock: fix scaling error --- Library/libs/clock.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Library/libs/clock.c b/Library/libs/clock.c index 9f9240c1..d65d7984 100644 --- a/Library/libs/clock.c +++ b/Library/libs/clock.c @@ -1,18 +1,15 @@ -/*************************** CLOCK ************************************/ - -#include -#include -#include -#include -#include - -/* FIXME: CLOCKS_PER_SEC query */ - +/*************************** CLOCK ************************************/ + +#include +#include +#include +#include +#include + clock_t clock(void) { struct tms __tms; times(&__tms); - return (__tms.tms_utime * CLOCKS_PER_SEC); + /* Already correctly scaled */ + return __tms.tms_utime; } - - -- 2.34.1