Simplify time() usage.
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org> * intrinsics/time_1.h (gf_gettime): Simplify time() usage. From-SVN: r181228
This commit is contained in:
parent
7454437875
commit
9f13f69749
@ -1,3 +1,7 @@
|
||||
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
|
||||
|
||||
* intrinsics/time_1.h (gf_gettime): Simplify time() usage.
|
||||
|
||||
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
|
||||
|
||||
* configure.ac (AC_STDC_HEADERS): Remove.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user