gstlearn  0.2.1
Geostatistics & Machine Learning toolbox
Timer Class Reference

#include <Timer.hpp>

Public Member Functions

 Timer ()
 
 Timer (const Timer &m)
 
Timeroperator= (const Timer &m)
 
virtual ~Timer ()
 
void reset ()
 
void displayIntervalSeconds (const String &title=String(), bool flag_reset=true)
 
double getIntervalSeconds (bool flag_reset=true)
 
void displaySeconds (const String &title, double sec)
 
void displayIntervalMilliseconds (const String &title=String(), bool flag_reset=true)
 
double getIntervalMilliseconds (bool flag_reset=true)
 
void displayMilliseconds (const String &title, double msec)
 

Private Attributes

hrc::time_point _refTime
 

Detailed Description

Allow calculation of Timer spent in a portion of the code

Constructor & Destructor Documentation

◆ Timer() [1/2]

Timer::Timer ( )

◆ Timer() [2/2]

Timer::Timer ( const Timer m)

◆ ~Timer()

Timer::~Timer ( )
virtual

Member Function Documentation

◆ displayIntervalMilliseconds()

void Timer::displayIntervalMilliseconds ( const String title = String(),
bool  flag_reset = true 
)

Displays the time elapsed (in ms) since the reference Timer

Parameters
titleTitle used for the internal display
flag_resetTrue if the Reference must be set to current Time

◆ displayIntervalSeconds()

void Timer::displayIntervalSeconds ( const String title = String(),
bool  flag_reset = true 
)

Displays the time elapsed (in s) since the reference Timer

Parameters
titleTitle used for the internal display
flag_resetTrue if the Reference must be set to current Time

◆ displayMilliseconds()

void Timer::displayMilliseconds ( const String title,
double  msec 
)

◆ displaySeconds()

void Timer::displaySeconds ( const String title,
double  sec 
)

◆ getIntervalMilliseconds()

double Timer::getIntervalMilliseconds ( bool  flag_reset = true)

◆ getIntervalSeconds()

double Timer::getIntervalSeconds ( bool  flag_reset = true)

◆ operator=()

Timer & Timer::operator= ( const Timer m)

◆ reset()

void Timer::reset ( )

Defines the reference Timer (beginning of a Timer chunk)

Member Data Documentation

◆ _refTime

hrc::time_point Timer::_refTime
private

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