#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 55 of file BenchTimer.h.
|
inline |
Definition at line 59 of file BenchTimer.h.
|
inline |
Definition at line 69 of file BenchTimer.h.
Return the best elapsed time in seconds
Definition at line 107 of file BenchTimer.h.
|
inline |
Definition at line 126 of file BenchTimer.h.
|
inline |
Definition at line 141 of file BenchTimer.h.
|
inline |
Definition at line 71 of file BenchTimer.h.
|
inline |
Definition at line 77 of file BenchTimer.h.
|
inline |
Definition at line 82 of file BenchTimer.h.
Return the total elapsed time in seconds.
Definition at line 121 of file BenchTimer.h.
Return the elapsed time in seconds between the last start/stop pair
Definition at line 100 of file BenchTimer.h.
Return the worst elapsed time in seconds
Definition at line 114 of file BenchTimer.h.
|
protected |
Definition at line 162 of file BenchTimer.h.
|
protected |
Definition at line 160 of file BenchTimer.h.
|
protected |
Definition at line 161 of file BenchTimer.h.
|
protected |
Definition at line 164 of file BenchTimer.h.
|
protected |
Definition at line 163 of file BenchTimer.h.