![]() |
Public API Reference |
Simple helper class to measure execution time of a block. More...
#include <csutil/measuretime.h>
Public Member Functions | |
| MeasureTime (const char *format,...) | |
| Construct with a formatted description string. | |
| void | PrintIntermediate (const char *descr,...) |
| Print an intermediate measurement. | |
Simple helper class to measure execution time of a block.
When destructed, csPrintf()s the time that has passed between construction and destruction in microseconds.
Use like:
void Foo (int x) { CS::MeasureTime measureFoo ("Foo (%d) time", x); // ... }
This will print the total execution time of Foo().
Definition at line 54 of file measuretime.h.
| CS::MeasureTime::MeasureTime | ( | const char * | format, |
| ... | |||
| ) | [inline] |
Construct with a formatted description string.
Definition at line 64 of file measuretime.h.
| void CS::MeasureTime::PrintIntermediate | ( | const char * | descr, |
| ... | |||
| ) | [inline] |
Print an intermediate measurement.
Definition at line 82 of file measuretime.h.