|
HIPO
4.3.0
High Performance Output data format for experimental physics
|
Simple timer for measuring code performance. More...
#include <utils.h>
Public Member Functions | |
| benchmark (const char *name) | |
| Constructs a benchmark with the given name. More... | |
| benchmark () | |
| Default constructor. More... | |
| benchmark (int freq) | |
| Constructs a benchmark with automatic printout frequency. More... | |
| ~benchmark () | |
| Destructor. More... | |
| void | reset () |
| Resets accumulated time and counter to zero. More... | |
| void | setName (const char *name) |
| Sets the display name of this benchmark. More... | |
| void | resume () |
| Starts or resumes the timer. More... | |
| void | pause () |
| Pauses the timer and accumulates elapsed time. More... | |
| long | getTime () |
| Returns the accumulated time in microseconds. More... | |
| double | getTimeSec () |
| Returns the accumulated time in seconds. More... | |
| int | getCounter () |
| Returns the number of resume/pause cycles recorded. More... | |
| void | show () |
| Prints the benchmark name, accumulated time, and counter. More... | |
Simple timer for measuring code performance.
Accumulates elapsed time across multiple resume/pause cycles and tracks the number of timing intervals recorded.
|
inline |
|
inline |
| int hipo::benchmark::getCounter | ( | ) |
| long hipo::benchmark::getTime | ( | ) |
| double hipo::benchmark::getTimeSec | ( | ) |
| void hipo::benchmark::pause | ( | ) |
|
inline |
| void hipo::benchmark::resume | ( | ) |
|
inline |
| void hipo::benchmark::show | ( | ) |