Generic hardware access library
HAL::StopWatch Class Reference

#include <StopWatch.hh>

List of all members.

Public Member Functions

 StopWatch (uint32_t laps)
void start ()
void stop ()
void lap ()
void reset ()
uint32_t read ()
uint32_t readLap (uint32_t lapIndex, std::ostream &os=std::cout) throw ( IllegalValueException )

Private Member Functions

void calibrate ()
uint32_t subtractTime (timeval &stopTime, timeval &startTime)

Private Attributes

double startStopOffset
double lapOffset
uint32_t lapCounter
uint32_t maxLaps
timeval startTime
timeval stopTime
std::vector< timeval > lapVector

Detailed Description

Definition at line 14 of file StopWatch.hh.

Constructor & Destructor Documentation

HAL::StopWatch::StopWatch ( uint32_t  laps)

Definition at line 5 of file

Member Function Documentation

void HAL::StopWatch::calibrate ( ) [private]

Definition at line 46 of file

Definition at line 19 of file

uint32_t HAL::StopWatch::read ( )

Definition at line 24 of file

uint32_t HAL::StopWatch::readLap ( uint32_t  lapIndex,
std::ostream &  os = std::cout 
) throw ( IllegalValueException )

Definition at line 28 of file

Definition at line 41 of file

Definition at line 11 of file

Definition at line 15 of file

uint32_t HAL::StopWatch::subtractTime ( timeval &  stopTime,
timeval &  startTime 
) [private]

Definition at line 50 of file

Member Data Documentation

uint32_t HAL::StopWatch::lapCounter [private]

Definition at line 30 of file StopWatch.hh.

double HAL::StopWatch::lapOffset [private]

Definition at line 29 of file StopWatch.hh.

std::vector< timeval > HAL::StopWatch::lapVector [private]

Definition at line 34 of file StopWatch.hh.

uint32_t HAL::StopWatch::maxLaps [private]

Definition at line 31 of file StopWatch.hh.

Definition at line 28 of file StopWatch.hh.

timeval HAL::StopWatch::startTime [private]

Definition at line 32 of file StopWatch.hh.

timeval HAL::StopWatch::stopTime [private]

Definition at line 33 of file StopWatch.hh.

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