From 951a2682959db019bed7aaef0ab044dfe4ac5c14 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 7 Mar 1999 13:17:52 +0000 Subject: [PATCH] 1999-03-07 Mark Kettenis * sysdeps/unix/bsd/clock.c (timeval_to_clock_t): Use CLOCKS_PER_SEC instead of CLK_TCK. --- sysdeps/unix/bsd/clock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/bsd/clock.c b/sysdeps/unix/bsd/clock.c index 962ddba..c632c17 100644 --- a/sysdeps/unix/bsd/clock.c +++ b/sysdeps/unix/bsd/clock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,8 +17,8 @@ Boston, MA 02111-1307, USA. */ #include -#include #include +#include #ifdef __GNUC__ __inline @@ -26,8 +26,8 @@ __inline static clock_t timeval_to_clock_t (const struct timeval *tv) { - return (clock_t) ((tv->tv_sec * CLK_TCK) + - (tv->tv_usec * CLK_TCK / 1000000)); + return (clock_t) ((tv->tv_sec * CLOCKS_PER_SEC) + + (tv->tv_usec * CLOCKS_PER_SEC / 1000000)); } /* Return the time used by the program so far (user time + system time). */ -- 2.7.4