diff options
Diffstat (limited to 'contrib/libf2c/libF77/dtime_.c')
-rw-r--r-- | contrib/libf2c/libF77/dtime_.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/contrib/libf2c/libF77/dtime_.c b/contrib/libf2c/libF77/dtime_.c index e2c3a03cb7ad..e2ea1c6b5d67 100644 --- a/contrib/libf2c/libF77/dtime_.c +++ b/contrib/libf2c/libF77/dtime_.c @@ -23,31 +23,27 @@ #endif #endif - double -#ifdef KR_headers -dtime_(tarray) float *tarray; -#else -dtime_(float *tarray) -#endif +double +dtime_ (float *tarray) { #ifdef USE_CLOCK #ifndef CLOCKS_PER_SECOND #define CLOCKS_PER_SECOND Hz #endif - static double t0; - double t = clock(); - tarray[1] = 0; - tarray[0] = (t - t0) / CLOCKS_PER_SECOND; - t0 = t; - return tarray[0]; + static double t0; + double t = clock (); + tarray[1] = 0; + tarray[0] = (t - t0) / CLOCKS_PER_SECOND; + t0 = t; + return tarray[0]; #else - struct tms t; - static struct tms t0; + struct tms t; + static struct tms t0; - times(&t); - tarray[0] = (double)(t.tms_utime - t0.tms_utime) / Hz; - tarray[1] = (double)(t.tms_stime - t0.tms_stime) / Hz; - t0 = t; - return tarray[0] + tarray[1]; + times (&t); + tarray[0] = (double) (t.tms_utime - t0.tms_utime) / Hz; + tarray[1] = (double) (t.tms_stime - t0.tms_stime) / Hz; + t0 = t; + return tarray[0] + tarray[1]; #endif - } +} |