diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-12-12 11:07:36 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-12-12 11:07:36 +0000 |
commit | bc5b62ffdbf5205611f602ca5670cc7ffea648da (patch) | |
tree | e4485b88a1c5c705dbf6ccbc59d6391272a139ca /tools | |
parent | 6ab34cc44423075c1c2df00ed2f8133b15a638ee (diff) | |
download | mpfr-bc5b62ffdbf5205611f602ca5670cc7ffea648da.tar.gz |
[tools/timings-mpfr.c] always use clock() [now very accurate under Linux]
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11964 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tools')
-rw-r--r-- | tools/timings-mpfr.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tools/timings-mpfr.c b/tools/timings-mpfr.c index 36b7cfc05..18eb961ca 100644 --- a/tools/timings-mpfr.c +++ b/tools/timings-mpfr.c @@ -25,9 +25,6 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #include <string.h> #include "gmp.h" #include "mpfr.h" - -#if defined (USG) || defined (__SVR4) || defined (_UNICOS) || defined(HPUX) || defined(_MSC_VER) - #include <time.h> static int @@ -38,22 +35,6 @@ cputime (void) return clock () / (CLOCKS_PER_SEC / 1000); } -#else - -#include <sys/types.h> -#include <sys/resource.h> - -static int -cputime (void) -{ - struct rusage rus; - - getrusage (0, &rus); - return rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000; -} - -#endif - int main (int argc, char *argv[]) { |