|
|
| ClockClass () |
|
|
void | SetName (const std::string &_name) |
|
void | ClearClock () |
| Reset the clock.
|
|
void | StartClock () |
|
void | StopClock () |
|
void | StopPrintClock (std::ostream &_os) |
| Call StopClock and PrintClock.
|
|
void | PrintClock (std::ostream &_os) |
|
double | GetSeconds () const |
| Get the recorded time in seconds.
|
|
double | GetUSeconds () const |
| Get the recorded time in microseconds.
|
|
This class is used to measure the processor time used between StartClock and StopClock calls. This includes both user and system time.
- Note
- Instances of this class are not thread-safe and should only be used by a single thread. It is safe to run separate instances in different threads.
◆ SetName()
void ClockClass::SetName |
( |
const std::string & |
_name | ) |
|
Set the clock name.
- Parameters
-
◆ StartClock()
void ClockClass::StartClock |
( |
| ) |
|
Start the clock and the name is identity of this clock.
- Exceptions
-
If | the clock is already started. |
◆ StopClock()
void ClockClass::StopClock |
( |
| ) |
|
Stop the clock and calculate the total running time.
- Exceptions
-
If | the clock is already stopped. |
◆ PrintClock()
void ClockClass::PrintClock |
( |
std::ostream & |
_os | ) |
|
Print clock name and time in seconds to an outstream.
- Parameters
-
_os | The outstream to print to. |
The documentation for this class was generated from the following files:
- ClockClass.h
- ClockClass.cpp