Same as Timer but prints a report on destruction. This example shows its usage.
void myAlg(ListGraph &g,int n)
{
...
}
- See Also
- Timer
-
NoTimeReport
#include <lemon/time_measure.h>
|
| TimeReport (std::string title, std::ostream &os=std::cerr, bool run=true, bool active=true) |
| Constructor.
|
|
| ~TimeReport () |
| Destructor that prints the ellapsed time.
|
|
bool | active () const |
| Retrieve the activity status.
|
|
void | active (bool a) |
| Set the activity status.
|
|
| Timer (bool run=true) |
| Constructor.
|
|
void | reset () |
| Reset and stop the time counters.
|
|
void | start () |
| Start the time counters.
|
|
void | stop () |
| Stop the time counters.
|
|
void | halt () |
| Halt (i.e stop immediately) the time counters.
|
|
int | running () |
| Returns the running state of the timer.
|
|
void | restart () |
| Restart the time counters.
|
|
double | userTime () const |
| Gives back the ellapsed user time of the process.
|
|
double | systemTime () const |
| Gives back the ellapsed system time of the process.
|
|
double | cUserTime () const |
| Gives back the ellapsed user time of the process' children.
|
|
double | cSystemTime () const |
| Gives back the ellapsed user time of the process' children.
|
|
double | realTime () const |
| Gives back the ellapsed real time.
|
|
| operator TimeStamp () const |
| Computes the ellapsed time.
|
|
TimeReport |
( |
std::string |
title, |
|
|
std::ostream & |
os = std::cerr , |
|
|
bool |
run = true , |
|
|
bool |
active = true |
|
) |
| |
|
inline |
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. |
This function set whether the time report should actually be printed on destruction.