10 #ifndef OPENHRP_UTIL_TIME_MEASURE_H_INCLUDED 11 #define OPENHRP_UTIL_TIME_MEASURE_H_INCLUDED 38 double beginTime =
tv.tv_sec + (double)
tv.tv_usec * 1.0e-6;
40 double endTime =
tv.tv_sec + (double)
tv.tv_usec * 1.0e-6;
41 time_ = endTime - beginTime;
42 if (time_ > maxTime_) maxTime_ =
time_;
57 typedef unsigned __int64 ulonglong;
61 ulonglong iTimerScale;
74 BOOL iDummyBool = QueryPerformanceFrequency ((LARGE_INTEGER *) &iTimerScale);
80 BOOL iDummyBool = QueryPerformanceCounter ((LARGE_INTEGER *) &beginTime);
86 BOOL iDummyBool = QueryPerformanceCounter ((LARGE_INTEGER *) &endTime);
89 time_ = (double)(endTime - beginTime) / iTimerScale;
90 if (time_ > maxTime_) maxTime_ =
time_;
int BOOL
Another boolean type.
int gettimeofday(struct timeval *tv, struct timezone *tz)
double averageTime() const