GEOS
Public Member Functions | List of all members
geos::Stopwatch Class Reference

Class defining a simple stopwatch for interval timing. More...

#include <Stopwatch.hpp>

Public Member Functions

 Stopwatch ()
 Constructor.
 
 Stopwatch (real64 &resultVar)
 Constructor. More...
 
 ~Stopwatch ()
 Destructor.
 
void zero ()
 Zero out the timer.
 
real64 elapsedTime ()
 Return elapsed time in seconds since zero() was last called. More...
 

Detailed Description

Class defining a simple stopwatch for interval timing.

Note
Current implementation relies on std::chrono::steady_clock

Definition at line 32 of file Stopwatch.hpp.

Constructor & Destructor Documentation

◆ Stopwatch()

geos::Stopwatch::Stopwatch ( real64 resultVar)
inline

Constructor.

Parameters
resultVarreference to the variable that will store the result upon destruction (a common use case).

Definition at line 48 of file Stopwatch.hpp.

Member Function Documentation

◆ elapsedTime()

real64 geos::Stopwatch::elapsedTime ( )
inline

Return elapsed time in seconds since zero() was last called.

Returns
elapsed time

Definition at line 77 of file Stopwatch.hpp.


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