This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need higher resolution times for linpack benchmark


This is nor a gfortran answer, but here is a wall-clock timer that is
callable from Fortran and I use when I need it.

/* Return high-precision timestamp. */
#include <stddef.h>
#include <sys/time.h>
double gettime_ (void) {
       struct timeval timer;
       if (gettimeofday(&timer,NULL))
               return -1.0;
       return timer.tv_sec+
               1.0e-6*timer.tv_usec;
}

Regards,
Nick Maclaren.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]