[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to gnats/libiberty/clock.c
From: |
Milan Zamazal |
Subject: |
Changes to gnats/libiberty/clock.c |
Date: |
Mon, 10 Dec 2001 18:04:15 -0500 |
Index: gnats/libiberty/clock.c
diff -c gnats/libiberty/clock.c:1.2 gnats/libiberty/clock.c:1.3
*** gnats/libiberty/clock.c:1.2 Tue Oct 26 03:10:16 1999
--- gnats/libiberty/clock.c Mon Dec 10 18:03:27 2001
***************
*** 36,43 ****
#include <sys/times.h>
#endif
! #if defined (HAVE_TIMES) && ! defined (HZ) && defined (CLOCKS_PER_SEC)
! #define HZ CLOCKS_PER_SEC
#endif
/* FIXME: should be able to declare as clock_t. */
--- 36,55 ----
#include <sys/times.h>
#endif
! #ifdef HAVE_UNISTD_H
! #include <unistd.h>
! #endif
!
! #ifdef _SC_CLK_TCK
! #define GNU_HZ sysconf(_SC_CLK_TCK)
! #else
! #ifdef HZ
! #define GNU_HZ HZ
! #else
! #ifdef CLOCKS_PER_SEC
! #define GNU_HZ CLOCKS_PER_SEC
! #endif
! #endif
#endif
/* FIXME: should be able to declare as clock_t. */
***************
*** 56,62 ****
struct tms tms;
times (&tms);
! return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
#else
#ifdef VMS
struct
--- 68,74 ----
struct tms tms;
times (&tms);
! return (tms.tms_utime + tms.tms_stime) * (1000000 / GNU_HZ);
#else
#ifdef VMS
struct
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to gnats/libiberty/clock.c,
Milan Zamazal <=