]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libiberty/clock.c
clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on platforms that don't have HZ.
[thirdparty/gcc.git] / libiberty / clock.c
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