This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Need higher resolution times for linpack benchmark
- From: "N.M. Maclaren" <nmm1 at cam dot ac dot uk>
- To: ddf at iqdotdt dot com
- Cc: fortran at gcc dot gnu dot org
- Date: 11 Dec 2009 21:20:52 +0000
- Subject: Re: Need higher resolution times for linpack benchmark
- References: <200912111244.23042.ddf@iqdotdt.com>
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.