Cern
LibTmsApi 2.3.0

Stopwatch style timer. More...

#include <BTimer.h>

Public Member Functions

 BTimer ()
 
 ~BTimer ()
 
void start ()
 Start timer.
 
void stop ()
 Stop timer.
 
void clear ()
 Clear timer.
 
double getElapsedTime ()
 Returns the elapsed time from the last start.
 
void add (BTimer &timer)
 Add two timers.
 
double average ()
 Average time is duration between start() and stop() / number of stops.
 
double peak ()
 Peak time.
 

Static Private Member Functions

static double getTime ()
 

Private Attributes

BMutex olock
 
unsigned int onum
 
double ostartTime
 
double oendTime
 
double oaverage
 
double opeak
 

Detailed Description

Stopwatch style timer.

Constructor & Destructor Documentation

◆ BTimer()

BTimer::BTimer ( )

◆ ~BTimer()

BTimer::~BTimer ( )

Member Function Documentation

◆ add()

void BTimer::add ( BTimer timer)

Add two timers.

◆ average()

double BTimer::average ( )

Average time is duration between start() and stop() / number of stops.

◆ clear()

void BTimer::clear ( )

Clear timer.

◆ getElapsedTime()

double BTimer::getElapsedTime ( )

Returns the elapsed time from the last start.

◆ getTime()

double BTimer::getTime ( )
staticprivate

◆ peak()

double BTimer::peak ( )

Peak time.

◆ start()

void BTimer::start ( )

Start timer.

◆ stop()

void BTimer::stop ( )

Stop timer.

Member Data Documentation

◆ oaverage

double BTimer::oaverage
private

◆ oendTime

double BTimer::oendTime
private

◆ olock

BMutex BTimer::olock
private

◆ onum

unsigned int BTimer::onum
private

◆ opeak

double BTimer::opeak
private

◆ ostartTime

double BTimer::ostartTime
private

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