A helper class for automated time stamping. Timing is started as soon as an object of this class is created. To time some parts of a program, just create a new object and use the provided output operator to display the elapsed time. More...
#include <Timestamp.hpp>
Classes | |
| class | NullBuffer |
Public Member Functions | |
| unsigned long | getCurrentTimeInMs () const |
| Returns the current system time in milliseconds. More... | |
| double | getCurrentTimeinS () const |
| Returns the current system time in seconds. More... | |
| string | getElapsedTime () const |
| Returns a string representation of the current timer value. More... | |
| unsigned long | getElapsedTimeInMs () const |
| Returns the milliseconds since object creation. More... | |
| double | getElapsedTimeInS () const |
| Returns the time since instantiation in seconds. More... | |
| ostream & | getNullStream () |
| bool | isQuiet () |
| void | resetTimer () |
| Resets the internal timer. More... | |
| void | setQuiet (bool quiet) |
| Timestamp () | |
| Constructor. More... | |
Private Attributes | |
| NullBuffer | m_nullBuffer |
| std::ostream | m_nullStream |
| bool | m_quiet |
| unsigned long | m_startTime |
| The system at object instantiation. More... | |
A helper class for automated time stamping. Timing is started as soon as an object of this class is created. To time some parts of a program, just create a new object and use the provided output operator to display the elapsed time.
Definition at line 53 of file Timestamp.hpp.
| lvr2::Timestamp::Timestamp | ( | ) |
Constructor.
Definition at line 103 of file Timestamp.cpp.
| unsigned long lvr2::Timestamp::getCurrentTimeInMs | ( | ) | const |
Returns the current system time in milliseconds.
Definition at line 109 of file Timestamp.cpp.
| double lvr2::Timestamp::getCurrentTimeinS | ( | ) | const |
Returns the current system time in seconds.
Definition at line 121 of file Timestamp.cpp.
| string lvr2::Timestamp::getElapsedTime | ( | ) | const |
Returns a string representation of the current timer value.
Definition at line 136 of file Timestamp.cpp.
| unsigned long lvr2::Timestamp::getElapsedTimeInMs | ( | ) | const |
Returns the milliseconds since object creation.
Definition at line 116 of file Timestamp.cpp.
| double lvr2::Timestamp::getElapsedTimeInS | ( | ) | const |
Returns the time since instantiation in seconds.
Definition at line 126 of file Timestamp.cpp.
|
inline |
Definition at line 97 of file Timestamp.hpp.
|
inline |
Definition at line 95 of file Timestamp.hpp.
| void lvr2::Timestamp::resetTimer | ( | ) |
Resets the internal timer.
Definition at line 131 of file Timestamp.cpp.
|
inline |
Definition at line 87 of file Timestamp.hpp.
|
private |
Definition at line 111 of file Timestamp.hpp.
|
private |
Definition at line 112 of file Timestamp.hpp.
|
private |
Definition at line 110 of file Timestamp.hpp.
|
private |
The system at object instantiation.
Definition at line 109 of file Timestamp.hpp.