aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2011-11-09 20:30:38 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2011-11-09 20:30:38 +0200
commit9f13f697497c1bc7d3b9609eafad3ffec52d83b8 (patch)
treebf063c06847570d9800495f26112ff1ac7d66047 /libgfortran/intrinsics
parent745443787599147145baf2c0cdfe8ef463944a9c (diff)
downloadgcc-9f13f697497c1bc7d3b9609eafad3ffec52d83b8.zip
gcc-9f13f697497c1bc7d3b9609eafad3ffec52d83b8.tar.gz
gcc-9f13f697497c1bc7d3b9609eafad3ffec52d83b8.tar.bz2
Simplify time() usage.
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org> * intrinsics/time_1.h (gf_gettime): Simplify time() usage. From-SVN: r181228
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r--libgfortran/intrinsics/time_1.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/libgfortran/intrinsics/time_1.h b/libgfortran/intrinsics/time_1.h
index 73977cb..327f7cf 100644
--- a/libgfortran/intrinsics/time_1.h
+++ b/libgfortran/intrinsics/time_1.h
@@ -213,9 +213,8 @@ gf_gettime (time_t * secs, long * usecs)
*usecs = tv.tv_usec;
return err;
#else
- time_t t, t2;
- t = time (&t2);
- *secs = t2;
+ time_t t = time (NULL);
+ *secs = t;
*usecs = 0;
if (t == ((time_t)-1))
return -1;