#include <cppunit_timer.h>
Definition at line 24 of file cppunit_timer.h.
◆ Timer()
Definition at line 26 of file cppunit_timer.h.
26 {
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;
31#endif
32 }
BOOL WINAPI QueryPerformanceFrequency(OUT PLARGE_INTEGER lpFrequency)
Referenced by CTEInitTimer(), CTEStartTimer(), IoDeleteDevice(), MiniTimerDpcFunction(), NdisCancelTimer(), NdisInitializeTimer(), NdisMCancelTimer(), NdisMInitializeTimer(), NdisMSetPeriodicTimer(), NdisMSetTimer(), and NdisSetTimer().
◆ elapsedMilliseconds()
double Timer::elapsedMilliseconds |
( |
| ) |
const |
|
inline |
Definition at line 75 of file cppunit_timer.h.
75 {
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;
81#else
82 return 0;
83#endif
84 }
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Referenced by FileReporter::end(), and FileReporter::printSummary().
◆ restart()
Definition at line 40 of file cppunit_timer.h.
40 {
41#if defined (CPPUNIT_WIN32_TIMER)
43 if (m_start.HighPart == 0 && m_start.LowPart == 0) {
44 m_start = m_restart;
45 }
46#endif
47 }
BOOL WINAPI QueryPerformanceCounter(OUT PLARGE_INTEGER lpPerformanceCount)
Referenced by FileReporter::progress().
◆ start()
◆ stop()
Definition at line 49 of file cppunit_timer.h.
49 {
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) {
58 m_stop.HighPart -= 1;
59 }
60 m_stop.LowPart -= m_restart.LowPart -
stop.LowPart;
61 }
62 else {
63 if (
stop.LowPart - m_restart.LowPart > 0xFFFFFFFF - m_stop.LowPart) {
64 m_stop.HighPart += 1;
65 }
66 m_stop.LowPart +=
stop.LowPart - m_restart.LowPart;
67 }
68 }
69 else {
71 }
72#endif
73 }
Referenced by FileReporter::end(), and stop().
◆ supported()
static bool Timer::supported |
( |
| ) |
|
|
inlinestatic |
Definition at line 86 of file cppunit_timer.h.
86 {
87#if defined (CPPUNIT_WIN32_TIMER)
88 return true;
89#else
90 return false;
91#endif
92 }
The documentation for this class was generated from the following file: