Commit b207e09c by Mumit Khan Committed by Jeff Law

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
parent c79d1483
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.
......
/* 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
......
/* 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 ()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment