Print simply-formated timing information. More...
#include <util.h>
Public Member Functions | |
timer (const char *msg, int lvl=1) |
Print simply-formated timing information.
It starts the clock in the constructor, stops the clock in the destructor, and reports the CPU time and elapsed time in between. Typically one would declare an object of this class in a block of code, and let the object be cleaned up by compiler generated code at the end of its scope. Upon destruction of this object, it prints its lifespan. To distiguish the different time durations, the user should provide a meaningful description to the constructor.
![]() |