DGtal 1.3.0
|
#include <DGtal/base/Clock.h>
Public Member Functions | |
void | startClock () |
double | stopClock () const |
double | restartClock () |
Clock () | |
~Clock () | |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Private Attributes | |
struct timespec | myTimerStart |
internal timer object; More... | |
Description of class 'Clock'
Aim: To provide functions to start and stop a timer. Is useful to get performance of algorithms.
The following code snippet demonstrates how to use Clock
DGtal::Clock::Clock | ( | ) |
Constructor.
DGtal::Clock::~Clock | ( | ) |
Destructor.
bool DGtal::Clock::isValid | ( | ) | const |
Checks the validity/consistency of the object.
double DGtal::Clock::restartClock | ( | ) |
Restart the clock.
Referenced by test_RestartClock().
void DGtal::Clock::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
void DGtal::Clock::startClock | ( | ) |
Starts a clock.
Referenced by SCENARIO(), test_loopTick(), test_MultipleLoop(), and test_RestartClock().
double DGtal::Clock::stopClock | ( | ) | const |
Stops the clock.
Referenced by test_MultipleLoop(), and test_RestartClock().
|
private |