54 QueryPerformanceCounter(&
m_start);
55 #elif defined(__APPLE__)
58 clock_gettime(CLOCK_REALTIME, &
m_start);
65 QueryPerformanceCounter(&
m_end);
66 #elif defined(__APPLE__)
67 gettimeofday(&
m_end, 0);
69 clock_gettime(CLOCK_REALTIME, &
m_end);
79 #elif defined(__APPLE__)
82 if( result.tv_usec <
m_start.tv_usec)
85 result.tv_usec += 1000000;
88 result.tv_sec -=
m_start.tv_sec;
89 result.tv_usec -=
m_start.tv_usec;
95 if( result.tv_nsec <
m_start.tv_nsec)
98 result.tv_nsec += 1000000000;
101 result.tv_sec -=
m_start.tv_sec;
102 result.tv_nsec -=
m_start.tv_nsec;
112 QueryPerformanceFrequency(&frequency);
113 return Elapsed().QuadPart/
static_cast<NekDouble>(n) * 1.0/frequency.QuadPart;
114 #elif defined(__APPLE__)
117 ( elapsed.tv_usec/static_cast<NekDouble>(n) * 1.0e-6);
122 ( elapsed.tv_nsec/static_cast<NekDouble>(n) * 1.0e-9);
NekDouble TimePerTest(unsigned int n)
Returns amount of seconds per iteration in a test with n iterations.