gatb.core-API-1.4.2
LocalTimeInfo Class Reference

Helper for time info statistics. More...

#include <TimeInfo.hpp>

Public Member Functions

 LocalTimeInfo (TimeInfo &ti, const std::string &txt)
 
 ~LocalTimeInfo ()
 

Detailed Description

Helper for time info statistics.

This class allows to get the execution time within an instruction block.

See also the TIME_INFO macro that eases its usage.

Example:

void foo ()
{
TimeInfo t;
{
LocalTimeInfo local (t, "part1");
// do something here
}
// now, we dump the exec time of the instruction block enclosing the LocalTimeInfo instance
cout << "part1: " << t.getEntryByKey("part1") << " " endl;
}

Constructor & Destructor Documentation

LocalTimeInfo ( TimeInfo ti,
const std::string &  txt 
)
inline

Constuctor

Parameters
[in]ti: time info object to be used
[in]txt: key of the exec time to be got
~LocalTimeInfo ( )
inline

Destructor.


The documentation for this class was generated from the following file: