SOSpin is hosted by Hepforge, IPPP Durham
SOSpin  1.0.0

Measure elapsed time. More...

#include <include/timer.h>

Public Member Functions

 Timer ()
 Constructor. More...
 
 ~Timer ()
 Destructor. More...
 
void start ()
 Start timer. More...
 
void stop ()
 Stop the timer. More...
 
double getElapsedTime ()
 Get elapsed time in second. More...
 
double getElapsedTimeInSec ()
 Get elapsed time in second (same as getElapsedTime) More...
 
double getElapsedTimeInMilliSec ()
 Get elapsed time in milli-second. More...
 
double getElapsedTimeInMicroSec ()
 Get elapsed time in micro-second. More...
 

Private Attributes

double startTimeInMicroSec
 Store starting time in micro-second. More...
 
double endTimeInMicroSec
 Store ending time in micro-second. More...
 
int stopped
 Stop flag. More...
 
timeval startCount
 
timeval endCount
 

Detailed Description

Measure elapsed time.

Definition at line 48 of file timer.h.

Constructor & Destructor Documentation

Timer::Timer ( )

Constructor.

Definition at line 40 of file timer.cpp.

Timer::~Timer ( )

Destructor.

Definition at line 56 of file timer.cpp.

Member Function Documentation

double Timer::getElapsedTime ( )

Get elapsed time in second.

Definition at line 123 of file timer.cpp.

double Timer::getElapsedTimeInMicroSec ( )

Get elapsed time in micro-second.

Definition at line 88 of file timer.cpp.

double Timer::getElapsedTimeInMilliSec ( )

Get elapsed time in milli-second.

Definition at line 109 of file timer.cpp.

double Timer::getElapsedTimeInSec ( )

Get elapsed time in second (same as getElapsedTime)

Definition at line 116 of file timer.cpp.

void Timer::start ( )

Start timer.

Definition at line 62 of file timer.cpp.

void Timer::stop ( )

Stop the timer.

Definition at line 74 of file timer.cpp.

Member Data Documentation

timeval Timer::endCount
private

Definition at line 85 of file timer.h.

double Timer::endTimeInMicroSec
private

Store ending time in micro-second.

Definition at line 76 of file timer.h.

timeval Timer::startCount
private

Definition at line 84 of file timer.h.

double Timer::startTimeInMicroSec
private

Store starting time in micro-second.

Definition at line 74 of file timer.h.

int Timer::stopped
private

Stop flag.

Definition at line 78 of file timer.h.


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