spot
1.2.4
|
A map of timer, where each timer has a name. More...
#include <misc/timer.hh>
Public Member Functions | |
void | start (const std::string &name) |
Start a timer with name name. More... | |
void | stop (const std::string &name) |
Stop timer name. More... | |
void | cancel (const std::string &name) |
Cancel timer name. More... | |
const spot::timer & | timer (const std::string &name) const |
Return the timer name. More... | |
spot::timer & | timer (const std::string &name) |
Return the timer name. More... | |
bool | empty () const |
Whether there is no timer in the map. More... | |
SPOT_API std::ostream & | print (std::ostream &os) const |
Format information about all timers in a table. More... | |
void | reset_all () |
Remove information about all timers. More... | |
Protected Types | |
typedef std::pair< spot::timer, int > | item_type |
typedef std::map< std::string, item_type > | tm_type |
Protected Attributes | |
tm_type | tm |
A map of timer, where each timer has a name.
Timer_map also keeps track of the number of measures each timer has performed.
|
inline |
Cancel timer name.
The timer must have been previously started with start().
This cancel only the current measure. (Previous measures recorded by the timer are preserved.) When a timer that has not done any measure is canceled, it is removed from the map.
|
inline |
Whether there is no timer in the map.
If empty() return true, then either no timer where ever started, or all started timers were canceled without completing any measure.
SPOT_API std::ostream& spot::timer_map::print | ( | std::ostream & | os) | const |
Format information about all timers in a table.
|
inline |
Remove information about all timers.
|
inline |
|
inline |
Stop timer name.
The timer must have been previously started with start().
|
inline |
Return the timer name.
|
inline |
Return the timer name.