|
| typedef timespec | Count |
| typedef long long | Span |
Definition at line 30 of file PerformanceCounter.h.
◆ Count
◆ Span
◆ current() [1/2]
Retrieves the current value of the high-resolution performance counter.
Definition at line 143 of file PerformanceCounter.h.
144{
147 return result;
148}
◆ current() [2/2]
Definition at line 47 of file PerformanceCounter.h.
48 {
49#ifdef _WIN32
50 ::QueryPerformanceCounter(result);
51#else
52 ::clock_gettime(CLOCK_MONOTONIC, result);
53#endif
54 }
◆ elapsedMicroseconds()
◆ elapsedNanoseconds()
◆ isUndefinedValue()
| bool isUndefinedValue |
( |
const Count & | value | ) |
|
|
inlinestatic |
Definition at line 134 of file PerformanceCounter.h.
135{
136#ifdef _WIN32
137 return (0 == value.LowPart && 0 == value.HighPart);
138#else
139 return (0 == value.tv_sec && 0 == value.tv_nsec);
140#endif
141}
◆ nsSpan()
◆ setToUndefinedValue()
| void setToUndefinedValue |
( |
Count * | value | ) |
|
|
inlinestatic |
Definition at line 123 of file PerformanceCounter.h.
124{
125#ifdef _WIN32
126 value->LowPart = 0;
127 value->HighPart = 0;
128#else
129 value->tv_sec = 0;
130 value->tv_nsec = 0;
131#endif
132}
◆ usSpan()