csMeasureTime Class Reference
[Utilities]
Simple helper class to measure execution time of a block.
More...
#include <csutil/timemeasure.h>
Public Member Functions | |
csMeasureTime (const char *format,...) | |
Construct with a formatted description string. | |
void | PrintIntermediate (const char *descr,...) |
Print an intermediate measurement. | |
~csMeasureTime () | |
Protected Attributes | |
csTicks | offsetTime |
csString | text |
Detailed Description
Simple helper class to measure execution time of a block.When destructed, printf()s the time that has passed between construction and destruction in ms.
- Use like: This will print the total execution time of Foo().
void Foo (int x) { csMeasureTime measureFoo ("Foo (%d) time", x); // ... }
Definition at line 50 of file timemeasure.h.
Constructor & Destructor Documentation
|
Construct with a formatted description string.
Definition at line 59 of file timemeasure.h. References csGetTicks(), csStringBase::FormatV(), offsetTime, and text. |
Member Function Documentation
|
Print an intermediate measurement.
Definition at line 76 of file timemeasure.h. References csGetTicks(), csPrintf(), csPrintfV(), csStringFast< LEN >::GetData(), offsetTime, and text. |
The documentation for this class was generated from the following file:
- csutil/timemeasure.h
Generated for Crystal Space by doxygen 1.4.6