]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on platforms that don't have HZ.
authorMumit Khan <khan@xraylith.wisc.edu>
Tue, 2 Feb 1999 23:05:16 +0000 (23:05 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 2 Feb 1999 23:05:16 +0000 (16:05 -0700)
        * 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

libiberty/ChangeLog
libiberty/clock.c
libiberty/getruntime.c

index 09243f90ecfc0b073aa6aaae19a3ca5fb0bd032d..e3f67e126ce848f085ea59f464063113066d3243 100644 (file)
@@ -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.
index b204566ff25c9e5aec175dd6edd56a715512d36f..8d265406c3903b6ef74fbb76f02d024e2751de2f 100644 (file)
@@ -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
index 861622259016036bfa11353f53a91237c60baa98..74f4dd5b30757795a011c0fc5ffae9b7c1f70540 100644 (file)
@@ -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 ()
 {