EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | List of all members
ETimer Class Reference

Implements a stopwatch style timer. More...

#include <etimer.h>

Public Member Functions

 ETimer ()
 Default constructor. More...
 
 ETimer (const ETimer &a)
 Copy constructor. More...
 
 ETimer (const epctime_t t)
 Class constructor. More...
 
 ~ETimer ()
 Class desctructor. More...
 
Void Start ()
 Starts the timer. More...
 
Void Stop ()
 Stops the timer. More...
 
Void Set (epctime_t a)
 Assigns a value to the timer. More...
 
epctime_t MilliSeconds (Bool bRestart=False)
 Retrieves the current value of the timer in milliseconds. More...
 
epctime_t MicroSeconds (Bool bRestart=False)
 Retrieves the current value of the timer in microseconds. More...
 
ETimeroperator= (const ETimer &a)
 Assignment operator. More...
 
ETimeroperator= (const epctime_t t)
 Assignment operator. More...
 
 operator epctime_t ()
 Retrieves the internal epctime_t value. More...
 

Detailed Description

Implements a stopwatch style timer.

Constructor & Destructor Documentation

◆ ETimer() [1/3]

ETimer::ETimer ( )

Default constructor.

◆ ETimer() [2/3]

ETimer::ETimer ( const ETimer a)

Copy constructor.

Parameters
athe ETimer object to copy.

◆ ETimer() [3/3]

ETimer::ETimer ( const epctime_t  t)

Class constructor.

Parameters
tan epctime_t value to initilize the timer.

◆ ~ETimer()

ETimer::~ETimer ( )

Class desctructor.

Member Function Documentation

◆ MicroSeconds()

epctime_t ETimer::MicroSeconds ( Bool  bRestart = False)

Retrieves the current value of the timer in microseconds.

Parameters
bRestartif True, the timer is restarted, otherwise it continues.

◆ MilliSeconds()

epctime_t ETimer::MilliSeconds ( Bool  bRestart = False)

Retrieves the current value of the timer in milliseconds.

Parameters
bRestartif True, the timer is restarted, otherwise it continues.

◆ operator epctime_t()

ETimer::operator epctime_t ( )
inline

Retrieves the internal epctime_t value.

◆ operator=() [1/2]

ETimer & ETimer::operator= ( const epctime_t  t)

Assignment operator.

Parameters
tthe epctime_t value to assign.
Returns
a reference to this ETimer object.

◆ operator=() [2/2]

ETimer & ETimer::operator= ( const ETimer a)

Assignment operator.

Parameters
aETimer value to assign.
Returns
a reference to this ETimer object.

◆ Set()

void ETimer::Set ( epctime_t  a)

Assigns a value to the timer.

Parameters
athe value to assign to the timer.

◆ Start()

void ETimer::Start ( )

Starts the timer.

◆ Stop()

void ETimer::Stop ( )

Stops the timer.


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