40 QueryPerformanceFrequency(&freq);
42 m_freq = freq.QuadPart;
48 QueryPerformanceCounter(&tick);
50 m_start = tick.QuadPart;
55 QueryPerformanceCounter(&tick);
57 m_stop = tick.QuadPart;
62 return float(
double(m_stop - m_start) /
double(m_freq));
87 return float(m_stop - m_start) / float(CLOCKS_PER_SEC);
95 clock_gettime(CLOCK_PROCESS_CPUTIME_ID,&_time);
96 m_start = _time.tv_sec;
97 m_start_ns = _time.tv_nsec;
102 clock_gettime(CLOCK_PROCESS_CPUTIME_ID,&_time);
103 m_stop = _time.tv_sec;
104 m_stop_ns = _time.tv_nsec;
109 if (m_stop_ns < m_start_ns)
110 return float(
double(m_stop - m_start - 1) +
double(1000000000 + m_stop_ns - m_start_ns)*1.0e-9 );
112 return float(
double(m_stop - m_start) +
double(m_stop_ns - m_start_ns)*1.0e-9 );
120 gettimeofday(&_time,NULL);
121 m_start = _time.tv_sec;
122 m_start_ns = _time.tv_usec;
127 gettimeofday(&_time,NULL);
128 m_stop = _time.tv_sec;
129 m_stop_ns = _time.tv_usec;
134 if (m_stop_ns < m_start_ns)
135 return float(
double(m_stop - m_start - 1) +
double(1000000 + m_stop_ns - m_start_ns)*1.0e-6 );
137 return float(
double(m_stop - m_start) +
double(m_stop_ns - m_start_ns)*1.0e-6 );