16#ifndef CPPUNIT_TIMER_H
17#define CPPUNIT_TIMER_H
20# define CPPUNIT_WIN32_TIMER
27#if defined (CPPUNIT_WIN32_TIMER)
28 m_start.LowPart = m_restart.LowPart = m_stop.LowPart = 0;
29 m_start.HighPart = m_restart.HighPart = m_stop.HighPart = 0;
35#if defined (CPPUNIT_WIN32_TIMER)
41#if defined (CPPUNIT_WIN32_TIMER)
43 if (m_start.HighPart == 0 && m_start.LowPart == 0) {
50#if defined (CPPUNIT_WIN32_TIMER)
53 if ((m_stop.HighPart != 0 || m_stop.LowPart != 0) &&
54 m_restart.HighPart != 0 && m_restart.LowPart != 0) {
55 m_stop.HighPart += (
stop.HighPart - m_restart.HighPart);
56 if (
stop.LowPart < m_restart.LowPart) {
57 if (m_restart.LowPart -
stop.LowPart > m_stop.LowPart) {
60 m_stop.LowPart -= m_restart.LowPart -
stop.LowPart;
63 if (
stop.LowPart - m_restart.LowPart > 0xFFFFFFFF - m_stop.LowPart) {
66 m_stop.LowPart +=
stop.LowPart - m_restart.LowPart;
76#if defined (CPPUNIT_WIN32_TIMER)
78 elapsed.
HighPart = m_stop.HighPart - m_start.HighPart;
79 elapsed.
LowPart = m_stop.LowPart - m_start.LowPart;
80 return (
double)elapsed.
QuadPart / (
double)m_frequency.QuadPart * 1000;
87#if defined (CPPUNIT_WIN32_TIMER)
95#if defined (CPPUNIT_WIN32_TIMER)
double elapsedMilliseconds() const
BOOL WINAPI QueryPerformanceFrequency(OUT PLARGE_INTEGER lpFrequency)
BOOL WINAPI QueryPerformanceCounter(OUT PLARGE_INTEGER lpPerformanceCount)
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double