The implementation of Timer class.
More...
#include <Timer.hpp>
|
| 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 double | getWallTime () |
| Return the current time of the system in seconds.
|
|
The implementation of Timer class.
This is a definition of mTimer class. For measure the time, gettimeofday() api is used
- Deprecated:
- Use Stopwatch instead.
◆ Timer()
dart::common::Timer::Timer |
( |
const std::string & |
_name = "Noname Timer" | ) |
|
|
explicit |
◆ ~Timer()
dart::common::Timer::~Timer |
( |
| ) |
|
|
virtual |
◆ getElapsedTime()
double dart::common::Timer::getElapsedTime |
( |
| ) |
|
Return elapsed time in seconds since startTimer()
- See also
- start()
◆ getLastElapsedTime()
double dart::common::Timer::getLastElapsedTime |
( |
| ) |
const |
Return last elapsed time in seconds.
◆ getTotalElapsedTime()
double dart::common::Timer::getTotalElapsedTime |
( |
| ) |
const |
Return total elapsed time in seconds.
◆ getWallTime()
double dart::common::Timer::getWallTime |
( |
| ) |
|
|
static |
Return the current time of the system in seconds.
◆ isStarted()
bool dart::common::Timer::isStarted |
( |
| ) |
const |
Returns whether the timer is started.
◆ print()
void dart::common::Timer::print |
( |
| ) |
|
◆ start()
void dart::common::Timer::start |
( |
| ) |
|
◆ stop()
void dart::common::Timer::stop |
( |
| ) |
|
◆ mCount
int dart::common::Timer::mCount |
|
private |
◆ mIsStarted
bool dart::common::Timer::mIsStarted |
|
private |
◆ mLastElapsedTime
double dart::common::Timer::mLastElapsedTime |
|
private |
◆ mName
std::string dart::common::Timer::mName |
|
private |
◆ mStartedTime
double dart::common::Timer::mStartedTime |
|
private |
◆ mStoppedTime
double dart::common::Timer::mStoppedTime |
|
private |
◆ mTimeVal
timeval dart::common::Timer::mTimeVal |
|
private |
◆ mTotalElapsedTime
double dart::common::Timer::mTotalElapsedTime |
|
private |