45 QueryPerformanceCounter(&startCount);
47 gettimeofday(&startCount,
nullptr);
60 QueryPerformanceCounter(&endCount);
62 gettimeofday(&endCount,
nullptr);
72 QueryPerformanceFrequency(&frequency);
73 startCount.QuadPart = 0;
74 endCount.QuadPart = 0;
76 startCount.tv_sec = startCount.tv_usec = 0;
77 endCount.tv_sec = endCount.tv_usec = 0;
81 startTimeInMicroSec = 0;
82 endTimeInMicroSec = 0;
93 if (!stopped) QueryPerformanceCounter(&endCount);
96 startCount.QuadPart * (1000000.0 / frequency.QuadPart);
97 endTimeInMicroSec = endCount.QuadPart * (1000000.0 / frequency.QuadPart);
99 if (!stopped) gettimeofday(&endCount,
nullptr);
101 startTimeInMicroSec = (startCount.tv_sec * 1000000.0) + startCount.tv_usec;
102 endTimeInMicroSec = (endCount.tv_sec * 1000000.0) + endCount.tv_usec;
105 return endTimeInMicroSec - startTimeInMicroSec;
EXPORT double getElapsedTimeInMilliSec()
double getElapsedTimeInMicroSec()
EXPORT Timer(bool bStart=false)
double getElapsedTimeInSec()