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 42 of file TimeStamp.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 142 of file TimeStamp.cpp.

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

Destructor.

Definition at line 49 of file TimeStamp.h.


Member Function Documentation

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

Conversion double -> LARGE_INTEGER.

Definition at line 158 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 153 of file TimeStamp.cpp.

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

Increase the timestamp by TimeS seconds.

Parameters:
TimeSmust be >0!.

Definition at line 179 of file TimeStamp.cpp.

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

Retrieves time difference in seconds.

Definition at line 169 of file TimeStamp.cpp.

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

Reduces the timestamp by TimeS seconds.

Parameters:
TimeSmust be >0!.

Definition at line 189 of file TimeStamp.cpp.

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

Checks if this time is before time "Time".

Definition at line 210 of file TimeStamp.cpp.

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

Checks if this time is after time "Time".

Definition at line 201 of file TimeStamp.cpp.

Makes time measurement.

Definition at line 148 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 105 of file TimeStamp.h.

Seconds per counts.

Definition at line 108 of file TimeStamp.h.

LARGE_INTEGER RTB::TimeStamp::m_TimeStamp [protected]

Internal time stamp data.

Definition at line 88 of file TimeStamp.h.


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


schunk_powercube_chain
Author(s): Florian Weisshardt
autogenerated on Sat Jun 8 2019 20:25:18