TimeReport
Declared in lemon/time_measure.h, in the group Time Measuring and Counting; the same class on the Doxygen site.
-
class TimeReport : public Timer
Same as Timer but prints a report on destruction. This example shows its usage.
void myAlg( ListGraph & g , int n ) { TimeReport tr( "Running time of myAlg: " ); ... //Here comes the algorithm }
See also
See also
Public Functions
- inline TimeReport(
- std::string title,
- std::ostream & os = std::cerr,
- bool run = true,
- bool active = true
Constructor.
- Parameters:
title – This text will be printed before the ellapsed time.
os – The stream to print the report to.
run – Sets whether the timer should start immediately.
active – Sets whether the report should actually be printed on destruction.
-
inline ~TimeReport()
Destructor that prints the ellapsed time.
-
inline bool active() const
Retrieve the activity status.
-
inline void active( bool a )
Set the activity status.
This function set whether the time report should actually be printed on destruction.