From: Alan Cox Date: Tue, 24 Oct 2017 18:26:23 +0000 (+0100) Subject: clock: fix scaling error X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7a3b507be19570706b1237518fe7e7a824db7e68;p=FUZIX.git clock: fix scaling error --- 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; } - -