JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Member Functions | Protected Member Functions | Protected Attributes
RecurringTimer Class Reference

#include <RecurringTimer.h>

Public Member Functions

void start ()
 
void stop ()
 
void log (const std::string &what, const std::string &part) const
 
double durationSeconds () const
 

Protected Member Functions

std::chrono::time_point< std::chrono::system_clock > now ()
 

Protected Attributes

std::chrono::time_point< std::chrono::system_clock > startTime
 
std::chrono::duration< long long, std::micro > totalDur {}
 

Detailed Description

An cumulative timer that can be started and stopped multiple times and summs up each runtime.

Member Function Documentation

◆ durationSeconds()

double RecurringTimer::durationSeconds ( ) const

Returns the total duration of the timer in seconds.

Returns
the total duration of the timer in seconds.
Here is the caller graph for this function:

◆ log()

void RecurringTimer::log ( const std::string &  what,
const std::string &  part 
) const

Loggs the runtime to GLOG with an string tag and description "[<part>] <what> took <time>"

Parameters
whatthe description of what was measured
whatthe description of what was measured

◆ now()

std::chrono::time_point< std::chrono::system_clock > RecurringTimer::now ( )
protected
Here is the caller graph for this function:

◆ start()

void RecurringTimer::start ( )

Start the timer, has to be done explicitely after initializing the class

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

void RecurringTimer::stop ( )

Stopps the timer, and adds the runtime to the endresult.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ startTime

std::chrono::time_point<std::chrono::system_clock> RecurringTimer::startTime
protected

◆ totalDur

std::chrono::duration<long long, std::micro> RecurringTimer::totalDur {}
protected

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