libabigail
|
A type used to time various part of the libabigail system. More...
#include <abg-tools-utils.h>
Public Types | |
enum | kind { DEFAULT_TIMER_KIND , START_ON_INSTANTIATION_TIMER_KIND } |
Public Member Functions | |
timer (kind k=DEFAULT_TIMER_KIND) | |
Constructor of the timer type. More... | |
~timer () | |
Destructor of the timer type. More... | |
bool | start () |
Start the timer. More... | |
bool | stop () |
Stop the timer. More... | |
bool | value (time_t &hours, time_t &minutes, time_t &seconds, time_t &milliseconds) const |
Get the elapsed time in hour:minutes:seconds:milliseconds. More... | |
string | value_as_string () const |
Get the elapsed time as a human-readable string. More... | |
time_t | value_in_seconds () const |
Get the elapsed time in seconds. More... | |
A type used to time various part of the libabigail system.
Definition at line 309 of file abg-tools-utils.h.
enum kind |
Enumerator | |
---|---|
DEFAULT_TIMER_KIND | Default timer kind. |
START_ON_INSTANTIATION_TIMER_KIND | This kind of timer starts upon instantiation. |
Definition at line 315 of file abg-tools-utils.h.
timer | ( | timer::kind | k = DEFAULT_TIMER_KIND | ) |
Constructor of the timer type.
k | the kind of timer to instantiate. |
Definition at line 216 of file abg-tools-utils.cc.
~timer | ( | ) |
Destructor of the timer type.
Definition at line 324 of file abg-tools-utils.cc.
bool start | ( | ) |
Start the timer.
To stop the timer (and record the time elapsed since the timer was started), call the timer::stop member function.
Definition at line 230 of file abg-tools-utils.cc.
bool stop | ( | ) |
Stop the timer.
This records the time elapsed since the timer was started using the timer::start member function.
Definition at line 244 of file abg-tools-utils.cc.
bool value | ( | time_t & | hours, |
time_t & | minutes, | ||
time_t & | seconds, | ||
time_t & | milliseconds | ||
) | const |
Get the elapsed time in hour:minutes:seconds:milliseconds.
hours | out parameter. This is set to the number of hours elapsed. |
minutes | out parameter. This is set to the number of minutes (passed the number of hours) elapsed. |
seconds | out parameter. This is se to the number of seconds (passed the number of hours and minutes) elapsed. |
milliseconds. | This is set ot the number of milliseconds (passed the number of hours, minutes and seconds) elapsed. |
Definition at line 274 of file abg-tools-utils.cc.
string value_as_string | ( | ) | const |
Get the elapsed time as a human-readable string.
Definition at line 300 of file abg-tools-utils.cc.
time_t value_in_seconds | ( | ) | const |
Get the elapsed time in seconds.
Definition at line 256 of file abg-tools-utils.cc.