mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Initialise timeval
This commit is contained in:
parent
4ac1094856
commit
87ad76d81b
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user