diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-02 23:05:16 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-02 23:05:16 +0000 |
commit | 89e305f91dc8f05a84e08a734460dcc4ff1e19a7 (patch) | |
tree | c28698afc4fc5a6f1c16183fbbeedd10855eb73d /libiberty/clock.c | |
parent | af434f26181166bd09adee68286d8cafd90a7e27 (diff) | |
download | gcc-89e305f91dc8f05a84e08a734460dcc4ff1e19a7.tar.gz |
* clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on
platforms that don't have HZ.
* getruntime.c (HZ): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24993 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/clock.c')
-rw-r--r-- | libiberty/clock.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libiberty/clock.c b/libiberty/clock.c index b204566ff25..8d265406c39 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 |