#include <TdkSimpleProfilerEntry.h>
Public Types | |
typedef unsigned long | EntryId_t |
Public Member Functions | |
TdkSimpleProfilerEntry (const TdkSimpleProfilerEntry::EntryId_t entryId, std::string sName) | |
virtual | ~TdkSimpleProfilerEntry () |
Virtual destructor. | |
void | beginTimer (void) |
Marks the begining usage time of a piece of code. | |
void | endTimer (void) |
Marks the ending usage time of a piece of code. | |
bool | getElapsedTime (double &elapsedTime) |
std::string | getName (void) |
TdkSimpleProfilerEntry::EntryId_t | getId (void) |
Private Member Functions | |
double | getTimeSecsNow (void) |
Private Attributes | |
double | _tBeginSecs |
time set by the beginTimer(). | |
double | _tEndSecs |
time set by the endTimer(). | |
EntryId_t | _id |
std::string | _sName |
identifier name of the profile entry. |
typedef unsigned long TdkSimpleProfilerEntry::EntryId_t |
TdkSimpleProfilerEntry::TdkSimpleProfilerEntry | ( | const TdkSimpleProfilerEntry::EntryId_t | entryId, | |
std::string | sName | |||
) |
Constructor.
This | profile entry's identification id. | |
Name | of the this profile entry. |
TdkSimpleProfilerEntry::~TdkSimpleProfilerEntry | ( | ) | [virtual] |
Virtual destructor.
void TdkSimpleProfilerEntry::beginTimer | ( | void | ) |
Marks the begining usage time of a piece of code.
void TdkSimpleProfilerEntry::endTimer | ( | void | ) |
Marks the ending usage time of a piece of code.
bool TdkSimpleProfilerEntry::getElapsedTime | ( | double & | elapsedTime | ) |
Returns the profiled time between the begin and end timer.
the | time elapsed between the beginTimer and endTimer calls. |
std::string TdkSimpleProfilerEntry::getName | ( | void | ) |
Gets the name of this profile entry.
TdkSimpleProfilerEntry::EntryId_t TdkSimpleProfilerEntry::getId | ( | void | ) |
double TdkSimpleProfilerEntry::getTimeSecsNow | ( | void | ) | [private] |
Helper function that returns the number of clock seconds elapsed since the program was launched.
double TdkSimpleProfilerEntry::_tBeginSecs [private] |
time set by the beginTimer().
double TdkSimpleProfilerEntry::_tEndSecs [private] |
time set by the endTimer().
EntryId_t TdkSimpleProfilerEntry::_id [private] |
std::string TdkSimpleProfilerEntry::_sName [private] |
identifier name of the profile entry.