diff options
author | Mumit Khan <khan@xraylith.wisc.edu> | 1999-02-02 23:05:16 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-02-02 16:05:16 -0700 |
commit | b207e09ce50861a5ad20df036339beeb90eac189 (patch) | |
tree | c28698afc4fc5a6f1c16183fbbeedd10855eb73d | |
parent | c79d14839713912e676d1bd3269886f2dc851404 (diff) | |
download | gcc-b207e09ce50861a5ad20df036339beeb90eac189.zip gcc-b207e09ce50861a5ad20df036339beeb90eac189.tar.gz gcc-b207e09ce50861a5ad20df036339beeb90eac189.tar.bz2 |
clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on platforms that don't have HZ.
* clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on
platforms that don't have HZ.
* getruntime.c (HZ): Likewise.
From-SVN: r24993
-rw-r--r-- | libiberty/ChangeLog | 6 | ||||
-rw-r--r-- | libiberty/clock.c | 6 | ||||
-rw-r--r-- | libiberty/getruntime.c | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 09243f9..e3f67e1 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 3 00:01:15 1999 Mumit Khan <khan@xraylith.wisc.edu> + + * clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on + platforms that don't have HZ. + * getruntime.c (HZ): Likewise. + Sat Jan 30 13:28:04 1999 Richard Henderson <rth@cygnus.com> * Makefile.in (xstrdup.o): Depend on config.h. diff --git a/libiberty/clock.c b/libiberty/clock.c index b204566..8d26540 100644 --- a/libiberty/clock.c +++ b/libiberty/clock.c @@ -1,5 +1,5 @@ /* ANSI-compatible clock function. - Copyright (C) 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1999 Free Software Foundation, Inc. This file is part of the libiberty library. This library is free software; you can redistribute it and/or modify it under the @@ -36,6 +36,10 @@ the executable file might be covered by the GNU General Public License. */ #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. */ long diff --git a/libiberty/getruntime.c b/libiberty/getruntime.c index 8616222..74f4dd5 100644 --- a/libiberty/getruntime.c +++ b/libiberty/getruntime.c @@ -1,5 +1,5 @@ /* Return time used so far, in microseconds. - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright (C) 1994, 1999 Free Software Foundation, Inc. This file is part of the libiberty library. Libiberty is free software; you can redistribute it and/or @@ -47,6 +47,10 @@ Boston, MA 02111-1307, USA. */ #define CLOCKS_PER_SEC 1 #endif +#if defined (HAVE_TIMES) && ! defined (HZ) +#define HZ CLOCKS_PER_SEC +#endif + long get_run_time () { |