DART
6.7.3
|
The implementation of Timer class. More...
#include <Timer.hpp>
Public Member Functions | |
Timer (const std::string &_name="Noname Timer") | |
Default constructor. More... | |
virtual | ~Timer () |
Default destructor. More... | |
void | start () |
Start timer. More... | |
bool | isStarted () const |
Returns whether the timer is started. More... | |
void | stop () |
Stop the timer. More... | |
double | getElapsedTime () |
Return elapsed time in seconds since startTimer() More... | |
double | getLastElapsedTime () const |
Return last elapsed time in seconds. More... | |
double | getTotalElapsedTime () const |
Return total elapsed time in seconds. More... | |
void | print () |
Print results. More... | |
Static Public Member Functions | |
static double | getWallTime () |
Return the current time of the system in seconds. More... | |
Private Attributes | |
int | mCount |
timeval | mTimeVal |
double | mStartedTime |
double | mStoppedTime |
double | mLastElapsedTime |
double | mTotalElapsedTime |
std::string | mName |
bool | mIsStarted |
The implementation of Timer class.
This is a definition of mTimer class. For measure the time, gettimeofday() api is used
|
explicit |
Default constructor.
|
virtual |
Default destructor.
double dart::common::Timer::getElapsedTime | ( | ) |
Return elapsed time in seconds since startTimer()
double dart::common::Timer::getLastElapsedTime | ( | ) | const |
Return last elapsed time in seconds.
double dart::common::Timer::getTotalElapsedTime | ( | ) | const |
Return total elapsed time in seconds.
|
static |
Return the current time of the system in seconds.
bool dart::common::Timer::isStarted | ( | ) | const |
Returns whether the timer is started.
void dart::common::Timer::print | ( | ) |
Print results.
void dart::common::Timer::start | ( | ) |
Start timer.
void dart::common::Timer::stop | ( | ) |
Stop the timer.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |