Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::StopwatchWallClock Class Reference

Implements a stopwatch measuring wall-clock time. More...

#include <ogdf/basic/Stopwatch.h>

+ Inheritance diagram for ogdf::StopwatchWallClock:

Public Member Functions

 StopwatchWallClock ()
 Creates a stopwatch for measuring wall-clock time with total time 0. More...
 
 StopwatchWallClock (int64_t milliSecs)
 Creates a stopwatch for measuring wall-clock time and sets its total time to milliSecs. More...
 
virtual ~StopwatchWallClock ()
 
- Public Member Functions inherited from ogdf::Stopwatch
 Stopwatch ()
 Initializes a stop watch with total time 0. More...
 
 Stopwatch (int64_t milliSecs)
 Initializes a stopwatch and sets its total time to milliSecs. More...
 
virtual ~Stopwatch ()
 
void addCentiSeconds (int64_t centiSeconds)
 Adds centiSeconds to total time. More...
 
int64_t centiSeconds () const
 Returns the currently elapsed time in 1/100-seconds. More...
 
bool exceeds (int64_t maxSeconds) const
 Returns true iff the currently elapsed time exceeds maxSeconds. More...
 
int64_t hours () const
 Returns the currently elapsed time in hours. More...
 
int64_t milliSeconds () const
 Returns the currently elapsed time in milliseconds. More...
 
int64_t minutes () const
 Returns the currently elapsed time in minutes. More...
 
void reset ()
 Stops the stopwatch and sets its total time to 0. More...
 
bool running () const
 Returns true if the stopwatch is running, false otherwise. More...
 
int64_t seconds () const
 Returns the currently elapsed time in seconds. More...
 
void start (bool reset=false)
 Starts the stopwatch. More...
 
void stop ()
 Stops the stopwatch and adds the difference between the current time and the starting time to the total time. More...
 

Private Member Functions

virtual int64_t theTime () const override
 Returns the current wall-clock time in milliseconds (from some fixed starting point). More...
 

Additional Inherited Members

Detailed Description

Implements a stopwatch measuring wall-clock time.

Definition at line 183 of file Stopwatch.h.

Constructor & Destructor Documentation

◆ StopwatchWallClock() [1/2]

ogdf::StopwatchWallClock::StopwatchWallClock ( )
inline

Creates a stopwatch for measuring wall-clock 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 190 of file Stopwatch.h.

◆ StopwatchWallClock() [2/2]

ogdf::StopwatchWallClock::StopwatchWallClock ( int64_t  milliSecs)
inlineexplicit

Creates a stopwatch for measuring wall-clock 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.

Parameters
milliSecsThe intial value of the total time in milliseconds.

Definition at line 199 of file Stopwatch.h.

◆ ~StopwatchWallClock()

virtual ogdf::StopwatchWallClock::~StopwatchWallClock ( )
inlinevirtual

Definition at line 201 of file Stopwatch.h.

Member Function Documentation

◆ theTime()

virtual int64_t ogdf::StopwatchWallClock::theTime ( ) const
overrideprivatevirtual

Returns the current wall-clock time in milliseconds (from some fixed starting point).

Implements ogdf::Stopwatch.


The documentation for this class was generated from the following file: