|
TR-mbed 1.0
|
#include <BenchTimer.h>
Public Member Functions | |
| BenchTimer () | |
| ~BenchTimer () | |
| void | reset () |
| void | start () |
| void | stop () |
| double | value (int TIMER=CPU_TIMER) const |
| double | best (int TIMER=CPU_TIMER) const |
| double | worst (int TIMER=CPU_TIMER) const |
| double | total (int TIMER=CPU_TIMER) const |
| 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
|
inline |
|
inline |
Return the best elapsed time in seconds
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return the total elapsed time in seconds.
Return the elapsed time in seconds between the last start/stop pair
Return the worst elapsed time in seconds
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |