source: trunk/src/gcc/libiberty/getruntime.c@ 1384

Last change on this file since 1384 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.8 KB
Line 
1/* Return time used so far, in microseconds.
2 Copyright (C) 1994, 1999 Free Software Foundation, Inc.
3
4This file is part of the libiberty library.
5Libiberty is free software; you can redistribute it and/or
6modify it under the terms of the GNU Library General Public
7License as published by the Free Software Foundation; either
8version 2 of the License, or (at your option) any later version.
9
10Libiberty is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13Library General Public License for more details.
14
15You should have received a copy of the GNU Library General Public
16License along with libiberty; see the file COPYING.LIB. If
17not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18Boston, MA 02111-1307, USA. */
19
20#include "config.h"
21
22#include "ansidecl.h"
23#include "libiberty.h"
24
25/* There are several ways to get elapsed execution time; unfortunately no
26 single way is available for all host systems, nor are there reliable
27 ways to find out which way is correct for a given host. */
28
29#ifdef TIME_WITH_SYS_TIME
30# include <sys/time.h>
31# include <time.h>
32#else
33# if HAVE_SYS_TIME_H