clock: fix scaling error
authorAlan Cox <alan@linux.intel.com>
Tue, 24 Oct 2017 18:26:23 +0000 (19:26 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 24 Oct 2017 18:26:23 +0000 (19:26 +0100)
Library/libs/clock.c

index 9f9240c..d65d798 100644 (file)
@@ -1,18 +1,15 @@
-/*************************** CLOCK ************************************/  \r
-\r
-#include <types.h>\r
-#include <unistd.h>\r
-#include <time.h>\r
-#include <string.h>\r
-#include <sys/times.h>\r
-\r
-/* FIXME: CLOCKS_PER_SEC query */\r
-\r
+/*************************** CLOCK ************************************/
+
+#include <types.h>
+#include <unistd.h>
+#include <time.h>
+#include <string.h>
+#include <sys/times.h>
+
 clock_t clock(void)
 {
        struct tms __tms;
        times(&__tms);
-       return (__tms.tms_utime * CLOCKS_PER_SEC);
+       /* Already correctly scaled */
+       return __tms.tms_utime;
 }
-
-\r