Public Member Functions

TimeReport Class Reference


Detailed Description

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:
Timer
NoTimeReport

#include <lemon/time_measure.h>

Inheritance diagram for TimeReport:

List of all members.

Public Member Functions

 TimeReport (std::string title, std::ostream &os=std::cerr, bool run=true)
 Constructor.
 ~TimeReport ()
 Destructor that prints the ellapsed time.

Constructor & Destructor Documentation

TimeReport ( std::string  title,
std::ostream &  os = std::cerr,
bool  run = true 
) [inline]

Constructor.

Parameters:
titleThis text will be printed before the ellapsed time.
osThe stream to print the report to.
runSets whether the timer should start immediately.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines