It includes some useful string output for timers.
|
Formated string output for timer data |
std::string | getDescription (size_t padWidth=35) const |
| Returns the description from the constructor (used by follwing functions).
|
void | setDescription (const std::string &crstrDesc) |
| Returns the description from the constructor (used by follwing functions).
|
std::string | timeString () const |
| Returns <DESCRIPTION>: <accumulatedTime> seconds.
|
std::string | relativeThroughputString (size_t items, const std::string &itemsname="") const |
| Returns <DESCRIPTION>: <items/accumulatedTime> <itemname> / second.
|
std::string | percentString (double relative_to_seconds) const |
| Returns <DESCRIPTION>: <accumulatedTime/relative_to_seconds>.
|
std::string | percentString (const Timer &relative_to_timer) const |
| Returns <DESCRIPTION>: <accumulatedTime/relative_to_seconds>.
|
std::string | timeAndPercentString (double relative_to_seconds) const |
| Returns absolute (timeString) and relative (percentString) as one string.
|
std::string | timeAndPercentString (const Timer &relative_to_timer) const |
| Returns absolute (timeString) and relative (percentString) as one string.
|
std::string | timeAndPercentAndThroughputString (double relative_to_seconds, size_t relative_to_items, const std::string &itemsname="") const |
| Returns combination of timeAndPercentString plus relativeThroughputString .
|
std::string | timeString (double dTime) |
Public Member Functions |
| Timer (const std::string &clstrDescription="") |
| Constructor.
|
void | start (void) |
void | stop (void) |
void | reset (void) |
double | getAccumulatedTime (void) const |
| Retrieve the accumulated time To avoid division by zero errors we never return zero but FLT_MIN instead.
|
double | getTimeSoFar () const |
| Returns timed time up to now.
|
|
Timer | operator+ (const Timer &crclOther) const |
| Addition of timers.
|
Timer | operator- (const Timer &crclOther) const |
| Subtraction of timers.
|