88 bool running()
const {
return m_running; }
95 return m_running ? m_totalTime + theTime() - m_startTime : m_totalTime;
Basic declarations, included by all source files.
Implements a stopwatch measuring CPU time.
StopwatchCPU(int64_t milliSecs)
Creates a stopwatch for measuring CPU time and sets its total time to milliSecs.
StopwatchCPU()
Creates a stopwatch for measuring CPU time with total time 0.
virtual int64_t theTime() const override
Returns the current CPU time in milliseconds (from some fixed starting point).
Realizes a stopwatch for measuring elapsed time.
int64_t m_totalTime
The total time in milliseconds.
friend std::ostream & operator<<(std::ostream &os, const Stopwatch &stopwatch)
Writes the currently elapsed time in the format hh:mm:ss.sec/100 to output stream os.
int64_t hours() const
Returns the currently elapsed time in hours.
int64_t centiSeconds() const
Returns the currently elapsed time in 1/100-seconds.
Stopwatch()
Initializes a stop watch with total time 0.
bool m_running
true, if the timer is running.
int64_t m_startTime
The start time of the timer in milliseconds.
void start(bool reset=false)
Starts the stopwatch.
Stopwatch(int64_t milliSecs)
Initializes a stopwatch and sets its total time to milliSecs.
void addCentiSeconds(int64_t centiSeconds)
Adds centiSeconds to total time.
void reset()
Stops the stopwatch and sets its total time to 0.
int64_t seconds() const
Returns the currently elapsed time in seconds.
void stop()
Stops the stopwatch and adds the difference between the current time and the starting time to the tot...
int64_t minutes() const
Returns the currently elapsed time in minutes.
bool exceeds(int64_t maxSeconds) const
Returns true iff the currently elapsed time exceeds maxSeconds.
bool running() const
Returns true if the stopwatch is running, false otherwise.
int64_t milliSeconds() const
Returns the currently elapsed time in milliseconds.
virtual int64_t theTime() const =0
Returns the current time in milliseconds (from some fixed starting point).
Implements a stopwatch measuring wall-clock time.
StopwatchWallClock()
Creates a stopwatch for measuring wall-clock time with total time 0.
StopwatchWallClock(int64_t milliSecs)
Creates a stopwatch for measuring wall-clock time and sets its total time to milliSecs.
virtual int64_t theTime() const override
Returns the current wall-clock time in milliseconds (from some fixed starting point).
virtual ~StopwatchWallClock()
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.