1.1.0
CCC
 
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="", 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)
 

Detailed Description

Allow calculation of Timer spent in a portion of the code

Constructor & Destructor Documentation

Timer::Timer ( )
Timer::Timer ( const Timer m)
Timer::~Timer ( )
virtual

Member Function Documentation

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
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
void Timer::displayMilliseconds ( const String title,
double  msec,
int  expected_time = -1 
)
void Timer::displaySeconds ( const String title,
double  sec,
int  expected_time = -1 
)
double Timer::getIntervalMilliseconds ( bool  flag_reset = true)
double Timer::getIntervalSeconds ( bool  flag_reset = true)
Timer & Timer::operator= ( const Timer m)
void Timer::reset ( )

Defines the reference Timer (beginning of a Timer chunk)


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