1.3.1
CCC
 
Timer Class Reference

#include <Timer.hpp>

Detailed Description

Allow calculation of Timer spent in a portion of the code

Public Member Functions

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

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 = "",
int  expected_time = -1,
bool  flag_reset = true 
)

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

Parameters
titleTitle used for the internal display
expected_timeExpected number of milliseconds (-1 if not used)
flag_resetTrue if the Reference must be set to current Time

◆ displayIntervalSeconds()

void Timer::displayIntervalSeconds ( const String title = "",
int  expected_time = -1,
bool  flag_reset = true 
)

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

Parameters
titleTitle used for the internal display
expected_timeExpected number of seconds (-1 if not used)
flag_resetTrue if the Reference must be set to current Time

◆ displayMilliseconds()

void Timer::displayMilliseconds ( const String title,
double  msec,
int  expected_time = -1 
)

◆ displaySeconds()

void Timer::displaySeconds ( const String title,
double  sec,
int  expected_time = -1 
)

◆ 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)


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