measure
is a structure capable of measuring elapsed time. Values printed and returned are in milliseconds (ms).
measure(const std::string& label, bool start_measure = false, bool silent = false);
Creates a measuring object labeled with a label
.
If start_measure
is true it starts measuring when instantiated (constructor calls start()
).
If silent
is true it prints no measurement info but stop()
and pause()
still returns elapsed time in ms.
Starts measuring.
Pauses measuring and returns elapsed time from start in ms.
Unpause measuring.
Stops measuring, if silent
is not true
it prints measured info and returns elapsed time in ms.
stop()
is called when measur struct is destructed.