#include <PerformanceTimer.h>
Public Member Functions | |
| PerformanceTimer () | |
| ~PerformanceTimer () | |
| unsigned int | getTime_usec () |
| void | printTime () |
| void | start (string procName) |
| void | stop () |
Private Member Functions | |
| PerformanceTimer (const PerformanceTimer &) | |
| PerformanceTimer | operator= (const PerformanceTimer &) |
Private Attributes | |
| timeval | startTime |
| timeval | endTime |
| string | processName |
| bool | timerStopped |
Definition at line 36 of file PerformanceTimer.h.
|
|
Constructor Definition at line 33 of file PerformanceTimer.cpp. References endTime, startTime, and timerStopped. |
|
|
Destructor. Definition at line 46 of file PerformanceTimer.cpp. |
|
|
Declare copy constructor private so it cannot be used inadvertently. |
|
|
Returns how long since the timer was started in microseconds. Definition at line 58 of file PerformanceTimer.cpp. References endTime, startTime, and timerStopped. |
|
|
Declare assignment private so it cannot be used. |
|
|
Prints out the time since it started. Definition at line 68 of file PerformanceTimer.cpp. References endTime, processName, startTime, and timerStopped. |
|
|
Starts the timer by recording the current time. Definition at line 78 of file PerformanceTimer.cpp. References endTime, processName, startTime, and timerStopped. |
|
|
Stops the timer. Definition at line 87 of file PerformanceTimer.cpp. References endTime, and timerStopped. |
|
|
Time structures to record the start time. Definition at line 53 of file PerformanceTimer.h. Referenced by getTime_usec(), PerformanceTimer(), printTime(), start(), and stop(). |
|
|
Name of the process or method that is being timed. Definition at line 56 of file PerformanceTimer.h. Referenced by printTime(), and start(). |
|
|
Time structures to record the start time. Definition at line 50 of file PerformanceTimer.h. Referenced by getTime_usec(), PerformanceTimer(), printTime(), and start(). |
|
|
When the timer is running this is set to false. Setting this to true stops the timer and end time is no longer updated. Definition at line 60 of file PerformanceTimer.h. Referenced by getTime_usec(), PerformanceTimer(), printTime(), start(), and stop(). |
1.4.4