1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Initialise timeval

This commit is contained in:
Peter Boyle 2022-06-30 13:42:46 -04:00
parent 4ac1094856
commit 87ad76d81b

View File

@ -39,9 +39,9 @@ NAMESPACE_BEGIN(Grid)
// C++11 time facilities better?
inline double usecond(void) {
struct timeval tv;
#ifdef TIMERS_ON
tv.tv_sec = 0;
tv.tv_usec = 0;
gettimeofday(&tv,NULL);
#endif
return 1.0*tv.tv_usec + 1.0e6*tv.tv_sec;
}