mirror of
https://github.com/paboyle/Grid.git
synced 2026-10-08 00:38:06 +01:00
Initialise timeval
This commit is contained in:
1 parent
4ac1094856
commit
87ad76d81b
1 file changed
+2
-2
@@ -39,9 +39,9 @@ NAMESPACE_BEGIN(Grid)
|
|||||||
// C++11 time facilities better?
|
// C++11 time facilities better?
|
||||||
inline double usecond(void) {
|
inline double usecond(void) {
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
#ifdef TIMERS_ON
|
tv.tv_sec = 0;
|
||||||
|
tv.tv_usec = 0;
|
||||||
gettimeofday(&tv,NULL);
|
gettimeofday(&tv,NULL);
|
||||||
#endif
|
|
||||||
return 1.0*tv.tv_usec + 1.0e6*tv.tv_sec;
|
return 1.0*tv.tv_usec + 1.0e6*tv.tv_sec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user