Public Member Functions | Protected Attributes | Static Private Member Functions | Static Private Attributes | List of all members
RTB::TimeStamp Class Reference

#include <TimeStamp.h>

Public Member Functions

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

Protected Attributes

LARGE_INTEGER m_TimeStamp
 Internal time stamp data. More...
 

Static Private Member Functions

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

Static Private Attributes

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

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

RTB::TimeStamp::TimeStamp ( )

Constructor.

Definition at line 142 of file TimeStamp.cpp.

virtual RTB::TimeStamp::~TimeStamp ( )
inlinevirtual

Destructor.

Definition at line 49 of file TimeStamp.h.

Member Function Documentation

LARGE_INTEGER RTB::TimeStamp::DoubleToLargeInt ( double  TimeS)
staticprivate

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)
staticprivate

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.

void RTB::TimeStamp::SetNow ( )

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)
staticprivate

Size of a Dword field.

Definition at line 105 of file TimeStamp.h.

double RTB::TimeStamp::m_SecPerCount = 1.0 / TimeStamp::LargeIntToDouble(ClockFrequency)
staticprivate

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 Mon Nov 25 2019 03:48:21