Implements a stopwatch measuring CPU time. More...
#include <ogdf/basic/Stopwatch.h>
Public Member Functions | |
StopwatchCPU () | |
Creates a stopwatch for measuring CPU time with total time 0. | |
StopwatchCPU (int64_t milliSecs) | |
Creates a stopwatch for measuring CPU time and sets its total time to milliSecs . | |
virtual | ~StopwatchCPU () |
Public Member Functions inherited from ogdf::Stopwatch | |
Stopwatch () | |
Initializes a stop watch with total time 0. | |
Stopwatch (int64_t milliSecs) | |
Initializes a stopwatch and sets its total time to milliSecs . | |
virtual | ~Stopwatch () |
void | addCentiSeconds (int64_t centiSeconds) |
Adds centiSeconds to total time. | |
int64_t | centiSeconds () const |
Returns the currently elapsed time in 1/100-seconds. | |
bool | exceeds (int64_t maxSeconds) const |
Returns true iff the currently elapsed time exceeds maxSeconds . | |
int64_t | hours () const |
Returns the currently elapsed time in hours. | |
int64_t | milliSeconds () const |
Returns the currently elapsed time in milliseconds. | |
int64_t | minutes () const |
Returns the currently elapsed time in minutes. | |
void | reset () |
Stops the stopwatch and sets its total time to 0. | |
bool | running () const |
Returns true if the stopwatch is running, false otherwise. | |
int64_t | seconds () const |
Returns the currently elapsed time in seconds. | |
void | start (bool reset=false) |
Starts the stopwatch. | |
void | stop () |
Stops the stopwatch and adds the difference between the current time and the starting time to the total time. | |
Private Member Functions | |
virtual int64_t | theTime () const override |
Returns the current CPU time in milliseconds (from some fixed starting point). | |
Additional Inherited Members |
Implements a stopwatch measuring CPU time.
Definition at line 154 of file Stopwatch.h.
|
inline |
Creates a stopwatch for measuring CPU time with total time 0.
After creation the stopwatch is not running, i.e., it has to be started explicitly for measuring time.
Definition at line 161 of file Stopwatch.h.
|
inlineexplicit |
Creates a stopwatch for measuring CPU time and sets its total time to milliSecs
.
After creation the stopwatch is not running, i.e., it has to be started explicitly for measuring time.
milliSecs | The intial value of the total time in milliseconds. |
Definition at line 170 of file Stopwatch.h.
|
inlinevirtual |
Definition at line 172 of file Stopwatch.h.
Returns the current CPU time in milliseconds (from some fixed starting point).
Implements ogdf::Stopwatch.