|
OSVR-Core
|
Elapsed time timer keeping the best try. More...
#include <BenchTimer.h>
Public Member Functions | |
| void | reset () |
| void | start () |
| void | stop () |
| double | value (int TIMER=CPU_TIMER) const |
| Return the elapsed time in seconds between the last start/stop pair. | |
| double | best (int TIMER=CPU_TIMER) const |
| Return the best elapsed time in seconds. | |
| double | worst (int TIMER=CPU_TIMER) const |
| Return the worst elapsed time in seconds. | |
| double | total (int TIMER=CPU_TIMER) const |
| Return the total elapsed time in seconds. | |
| double | getCpuTime () const |
| double | getRealTime () const |
Protected Attributes | |
| Vector2d | m_starts |
| Vector2d | m_times |
| Vector2d | m_bests |
| Vector2d | m_worsts |
| Vector2d | m_totals |
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
1.8.12