Commit 26837cfb by Donn Terry Committed by Craig Burley

standard-conforming error check for [de]time_.c

From-SVN: r26849
parent ea0f786b
Fri May 7 9:33:55 1999 Donn Terry (donn@interix.com)
* libU77/dtime_.c (G77_dtime_0): Standard-conforming error check.
* libU77/etime_.c (G77_etime_0): Likewise.
Mon May 3 19:15:07 1999 Craig Burley <craig@jcb-sc.com>
* libU77/u77-test.f (main): Declare ABORT as intrinsic.
......
......@@ -155,7 +155,7 @@ double G77_dtime_0 (real tarray[2])
# else
#error Dont know clock tick length
# endif
if (times(&buffer) < 0) return -1.0;
if (times(&buffer) == (clock_t)-1) return -1.0;
utime = buffer.tms_utime; stime = buffer.tms_stime;
tarray[0] = ((float)(utime - old_utime)) / (float)clk_tck;
tarray[1] = ((float)(stime - old_stime)) / (float)clk_tck;
......
......@@ -148,7 +148,7 @@ double G77_etime_0 (real tarray[2])
# else
#error Dont know clock tick length
# endif
if (times(&buffer) < 0) return -1.0;
if (times(&buffer) == (clock_t)-1) return -1.0;
tarray[0] = (float) buffer.tms_utime / (float)clk_tck;
tarray[1] = (float) buffer.tms_stime / (float)clk_tck;
#endif /* HAVE_GETRUSAGE */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment