parallel-cellular-automata
Framework for building parallel cellular automata.
|
RAII Timer that prints on cout the time elapsed since its creation and a message. The time is measured in microseconds. More...
#include <utimer.hpp>
Public Member Functions | |
UTimer (const std::string m) | |
Construct a new UTimer object. More... | |
UTimer (const std::string m, long *us) | |
Construct a new UTimer object. When the object is destroied inserts in *us the microseconds elapsed since the creation. More... | |
~UTimer () | |
Destroy the UTimer object and print the message containing the elapsed time. | |
Protected Attributes | |
long * | us_elapsed |
RAII Timer that prints on cout the time elapsed since its creation and a message. The time is measured in microseconds.
UTimer::UTimer | ( | const std::string | m | ) |
Construct a new UTimer object.
m | Message describing what is being computed. |
UTimer::UTimer | ( | const std::string | m, |
long * | us | ||
) |
Construct a new UTimer object. When the object is destroied inserts in *us the microseconds elapsed since the creation.
m | Message describing what is being computed. |
us | Pointer to variable in which to put the elapsed microsecond. |