[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
Timing macros for runtime measurements | ![]() |
#include <vigra/timing.hxx>
These macros allow to perform execution speed measurements. Results are reported in milliseconds. However, note that timings below 1 msec are generally subject to round-off errors. Under LINUX, you can #define VIGRA_HIRES_TIMING to get better accuracy, but this requires linking against librt.
Basic usage:
Instead of TOC, which outputs the time difference to std::cerr, you may use TOCN (the time difference in msec as a double) or TOCS (the time difference as a std::string).
Alternatively, you can perform nested timing like so:
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|