![]() |
Parasol Planning Library (PPL)
|
#include <ClockClass.h>
Public Member Functions | |
Construction | |
| ClockClass () | |
Interface | |
| void | SetName (const std::string &_name) |
| void | ClearClock () |
| Reset the clock. More... | |
| void | StartClock () |
| void | StopClock () |
| void | StopPrintClock (std::ostream &_os) |
| Call StopClock and PrintClock. More... | |
| void | PrintClock (std::ostream &_os) |
| double | GetSeconds () const |
| Get the recorded time in seconds. More... | |
| double | GetUSeconds () const |
| Get the recorded time in microseconds. More... | |
This class is used to measure the processor time used between StartClock and StopClock calls. This includes both user and system time.
| ClockClass::ClockClass | ( | ) |
| void ClockClass::ClearClock | ( | ) |
Reset the clock.
| double ClockClass::GetSeconds | ( | ) | const |
Get the recorded time in seconds.
| double ClockClass::GetUSeconds | ( | ) | const |
Get the recorded time in microseconds.
| void ClockClass::PrintClock | ( | std::ostream & | _os | ) |
Print clock name and time in seconds to an outstream.
| _os | The outstream to print to. |
| void ClockClass::SetName | ( | const std::string & | _name | ) |
Set the clock name.
| _name | The name to use. |
| void ClockClass::StartClock | ( | ) |
Start the clock and the name is identity of this clock.
| If | the clock is already started. |
| void ClockClass::StopClock | ( | ) |
Stop the clock and calculate the total running time.
| If | the clock is already stopped. |
| void ClockClass::StopPrintClock | ( | std::ostream & | _os | ) |
Call StopClock and PrintClock.