Public Member Functions | Protected Attributes | Static Private Member Functions | Static Private Attributes
RTB::TimeStamp Class Reference

#include <TimeStamp.h>

List of all members.

Public Member Functions

void getTimeStamp (long &lSeconds, long &lNanoSeconds)
void operator+= (double TimeS)
 Increase the timestamp by TimeS seconds.
double operator- (const TimeStamp &EarlierTime) const
 Retrieves time difference in seconds.
void operator-= (double TimeS)
 Reduces the timestamp by TimeS seconds.
bool operator< (const TimeStamp &Time)
 Checks if this time is before time "Time".
bool operator> (const TimeStamp &Time)
 Checks if this time is after time "Time".
void SetNow ()
 Makes time measurement.
void setTimeStamp (const long &lSeconds, const long &lNanoSeconds)
 TimeStamp ()
 Constructor.
virtual ~TimeStamp ()
 Destructor.

Protected Attributes

LARGE_INTEGER m_TimeStamp
 Internal time stamp data.

Static Private Member Functions

static LARGE_INTEGER DoubleToLargeInt (double TimeS)
 Conversion double -> LARGE_INTEGER.
static double LargeIntToDouble (const LARGE_INTEGER &LargeInt)
 Conversion timespec -> double.

Static Private Attributes

static double m_DwordSize = double(0xFFFFFFFF)
 Size of a Dword field.
static double m_SecPerCount = 1.0 / TimeStamp::LargeIntToDouble(ClockFrequency)
 Seconds per counts.

Detailed Description

Measure system time with very high accuracy. Use this class for measure system time accurately. Under Windows, it uses QueryPerformanceCounter(), which has a resolution of approx. one micro-second. The difference between two time stamps can be calculated.

Definition at line 84 of file TimeStamp.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 181 of file TimeStamp.cpp.

virtual RTB::TimeStamp::~TimeStamp ( ) [inline, virtual]

Destructor.

Definition at line 91 of file TimeStamp.h.


Member Function Documentation

LARGE_INTEGER RTB::TimeStamp::DoubleToLargeInt ( double  TimeS) [static, private]

Conversion double -> LARGE_INTEGER.

Definition at line 197 of file TimeStamp.cpp.

void RTB::TimeStamp::getTimeStamp ( long &  lSeconds,
long &  lNanoSeconds 
)

Gets seconds and nanoseconds of the timestamp.

double RTB::TimeStamp::LargeIntToDouble ( const LARGE_INTEGER &  LargeInt) [static, private]

Conversion timespec -> double.

Definition at line 192 of file TimeStamp.cpp.

void RTB::TimeStamp::operator+= ( double  TimeS)

Increase the timestamp by TimeS seconds.

Parameters:
TimeSmust be >0!.

Definition at line 217 of file TimeStamp.cpp.

double RTB::TimeStamp::operator- ( const TimeStamp EarlierTime) const

Retrieves time difference in seconds.

Definition at line 207 of file TimeStamp.cpp.

void RTB::TimeStamp::operator-= ( double  TimeS)

Reduces the timestamp by TimeS seconds.

Parameters:
TimeSmust be >0!.

Definition at line 227 of file TimeStamp.cpp.

bool RTB::TimeStamp::operator< ( const TimeStamp Time)

Checks if this time is before time "Time".

Definition at line 247 of file TimeStamp.cpp.

bool RTB::TimeStamp::operator> ( const TimeStamp Time)

Checks if this time is after time "Time".

Definition at line 239 of file TimeStamp.cpp.

Makes time measurement.

Definition at line 187 of file TimeStamp.cpp.

void RTB::TimeStamp::setTimeStamp ( const long &  lSeconds,
const long &  lNanoSeconds 
)

Sets timestamp from seconds and nanoseconds.


Member Data Documentation

double RTB::TimeStamp::m_DwordSize = double(0xFFFFFFFF) [static, private]

Size of a Dword field.

Definition at line 150 of file TimeStamp.h.

Seconds per counts.

Definition at line 153 of file TimeStamp.h.

LARGE_INTEGER RTB::TimeStamp::m_TimeStamp [protected]

Internal time stamp data.

Definition at line 132 of file TimeStamp.h.


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


schunk_powercube_chain
Author(s): Florian Weisshardt
autogenerated on Thu Aug 27 2015 15:06:58