aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics/etime.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2011-01-31 22:52:00 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2011-01-31 22:52:00 +0200
commitb6e7a3d1f97d5a2c611797ba52e75790888f0379 (patch)
tree218eeedfb68b9af80b02714d695e24e0effb0fbc /libgfortran/intrinsics/etime.c
parente1bcd685a28f47ae3b70b5a0f3f005e2d327b580 (diff)
downloadgcc-b6e7a3d1f97d5a2c611797ba52e75790888f0379.zip
gcc-b6e7a3d1f97d5a2c611797ba52e75790888f0379.tar.gz
gcc-b6e7a3d1f97d5a2c611797ba52e75790888f0379.tar.bz2
Use clock_gettime in libgfortran timing intrinsics, cleanup
From-SVN: r169449
Diffstat (limited to 'libgfortran/intrinsics/etime.c')
-rw-r--r--libgfortran/intrinsics/etime.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libgfortran/intrinsics/etime.c b/libgfortran/intrinsics/etime.c
index b0fd742..d90bc30 100644
--- a/libgfortran/intrinsics/etime.c
+++ b/libgfortran/intrinsics/etime.c
@@ -1,8 +1,9 @@
/* Implementation of the ETIME intrinsic.
- Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2009, 2011 Free Software
+ Foundation, Inc.
Contributed by Steven G. Kargl <kargls@comcast.net>.
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
+This file is part of the GNU Fortran runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -38,7 +39,7 @@ etime_sub (gfc_array_r4 *t, GFC_REAL_4 *result)
if (((GFC_DESCRIPTOR_EXTENT(t,0))) < 2)
runtime_error ("Insufficient number of elements in TARRAY.");
- if (__time_1 (&user_sec, &user_usec, &system_sec, &system_usec) == 0)
+ if (gf_cputime (&user_sec, &user_usec, &system_sec, &system_usec) == 0)
{
tu = (GFC_REAL_4)(user_sec + 1.e-6 * user_usec);
ts = (GFC_REAL_4)(system_sec + 1.e-6 * system_usec);