#include <BenchTimer.h>
Public Member Functions | |
BenchTimer () | |
double | best (int TIMER=CPU_TIMER) const |
double | getCpuTime () const |
double | getRealTime () const |
void | reset () |
void | start () |
void | stop () |
double | total (int TIMER=CPU_TIMER) const |
double | value (int TIMER=CPU_TIMER) const |
double | worst (int TIMER=CPU_TIMER) const |
~BenchTimer () | |
Protected Attributes | |
Vector2d | m_bests |
Vector2d | m_starts |
Vector2d | m_times |
Vector2d | m_totals |
Vector2d | m_worsts |
Elapsed time timer keeping the best try.
On POSIX platforms we use clock_gettime with CLOCK_PROCESS_CPUTIME_ID. On Windows we use QueryPerformanceCounter
Important: on linux, you must link with -lrt
Definition at line 59 of file BenchTimer.h.
|
inline |
Definition at line 63 of file BenchTimer.h.
|
inline |
Definition at line 73 of file BenchTimer.h.
Return the best elapsed time in seconds
Definition at line 111 of file BenchTimer.h.
|
inline |
Definition at line 130 of file BenchTimer.h.
|
inline |
Definition at line 145 of file BenchTimer.h.
|
inline |
Definition at line 75 of file BenchTimer.h.
|
inline |
Definition at line 81 of file BenchTimer.h.
|
inline |
Definition at line 86 of file BenchTimer.h.
Return the total elapsed time in seconds.
Definition at line 125 of file BenchTimer.h.
Return the elapsed time in seconds between the last start/stop pair
Definition at line 104 of file BenchTimer.h.
Return the worst elapsed time in seconds
Definition at line 118 of file BenchTimer.h.
|
protected |
Definition at line 166 of file BenchTimer.h.
|
protected |
Definition at line 164 of file BenchTimer.h.
|
protected |
Definition at line 165 of file BenchTimer.h.
|
protected |
Definition at line 168 of file BenchTimer.h.
|
protected |
Definition at line 167 of file BenchTimer.h.