Neobotix::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

timespec m_TimeStamp
 Internal time stamp data.

Static Private Member Functions

::timespec DoubleToTimespec (double TimeS)
 Conversion double -> timespec.
static double TimespecToDouble (const ::timespec &LargeInt)
 Conversion timespec -> double.

Detailed Description

Definition at line 25 of file TimeStamp.h.


Constructor & Destructor Documentation

TimeStamp::TimeStamp (  ) 

Constructor.

Definition at line 17 of file TimeStamp.cpp.

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

Destructor.

Definition at line 32 of file TimeStamp.h.


Member Function Documentation

timespec TimeStamp::DoubleToTimespec ( double  TimeS  )  [static, private]

Conversion double -> timespec.

Definition at line 33 of file TimeStamp.cpp.

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

Gets seconds and nanoseconds of the timestamp.

Definition at line 105 of file TimeStamp.cpp.

void TimeStamp::operator+= ( double  TimeS  ) 

Increase the timestamp by TimeS seconds.

Parameters:
TimeS must be >0!.

Definition at line 65 of file TimeStamp.cpp.

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

Retrieves time difference in seconds.

Definition at line 50 of file TimeStamp.cpp.

void TimeStamp::operator-= ( double  TimeS  ) 

Reduces the timestamp by TimeS seconds.

Parameters:
TimeS must be >0!.

Definition at line 77 of file TimeStamp.cpp.

bool TimeStamp::operator< ( const TimeStamp Time  ) 

Checks if this time is before time "Time".

Definition at line 97 of file TimeStamp.cpp.

bool TimeStamp::operator> ( const TimeStamp Time  ) 

Checks if this time is after time "Time".

Definition at line 89 of file TimeStamp.cpp.

void TimeStamp::SetNow (  ) 

Makes time measurement.

Definition at line 23 of file TimeStamp.cpp.

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

Sets timestamp from seconds and nanoseconds.

Definition at line 111 of file TimeStamp.cpp.

double TimeStamp::TimespecToDouble ( const ::timespec &  LargeInt  )  [static, private]

Conversion timespec -> double.

Definition at line 28 of file TimeStamp.cpp.


Member Data Documentation

timespec Neobotix::TimeStamp::m_TimeStamp [protected]

Internal time stamp data.

return the current time as string, in long format YYYY-MM-DD HH:MM:SS.ssssss Attention *** call SetNow() before calling this function

Definition at line 78 of file TimeStamp.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


cob_forcetorque
Author(s): Alexander Bubeck
autogenerated on Fri Jan 11 09:54:28 2013