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] |
Not to be confused with high precision timer implemented in some cases on Windows, this should be capable of resolution within a microsecond on linux. OpenMP omp_get_wtime() is likely to be implemented similar to this.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] |