HyperspaceExplorer 0.7.1
|
A class to write timing information to a std::ostream. More...
#include <ScopedTimer.h>
Classes | |
struct | Impl |
Public Member Functions | |
ScopedTimer (const std::string &message, std::ostream &out=std::cerr) | |
Private Attributes | |
Impl * | pImpl_ |
A class to write timing information to a std::ostream.
To use a ScopedTimer, simply instantiate one in the function whose run time you want to measure. As soon as the object goes out of scope, the time it took to execute the code between the instantiation and the destruction of the ScopedTimer is printed to a std::ostream, by default std::cerr.