|
DART 6.12.2
|
The implementation of Timer class. More...
#include <Timer.hpp>
Public Member Functions | |
| Timer (const std::string &_name="Noname Timer") | |
| Default constructor. | |
| virtual | ~Timer () |
| Default destructor. | |
| void | start () |
| Start timer. | |
| bool | isStarted () const |
| Returns whether the timer is started. | |
| void | stop () |
| Stop the timer. | |
| double | getElapsedTime () |
| Return elapsed time in seconds since startTimer() | |
| double | getLastElapsedTime () const |
| Return last elapsed time in seconds. | |
| double | getTotalElapsedTime () const |
| Return total elapsed time in seconds. | |
| void | print () |
| Print results. | |
Static Public Member Functions | |
| static double | getWallTime () |
| Return the current time of the system in seconds. | |
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 |