Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
icl_core::TimeBase Class Reference

Repesents time values. More...

#include <TimeBase.h>

Inheritance diagram for icl_core::TimeBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int64_t days () const
 Use this function if you want to express the time in days.
int64_t hours () const
int32_t microSeconds () const
int32_t milliSeconds () const
int64_t minutes () const
int32_t nanoSeconds () const
void normalizeTime ()
bool operator!= (const TimeBase &other) const
TimeBaseoperator+= (const TimeBase &span)
 Adds a TimeSpan.
TimeBaseoperator-= (const TimeBase &span)
 Substracts a TimeSpan.
bool operator< (const TimeBase &other) const
bool operator<= (const TimeBase &other) const
bool operator== (const TimeBase &other) const
bool operator> (const TimeBase &other) const
bool operator>= (const TimeBase &other) const
int64_t seconds () const
struct timespec systemTimespec () const
int32_t tbNSec () const
 Returns the nanosecond part of this time.
int64_t tbSec () const
 Returns the second part of this time.
struct timespec timespec () const

Protected Member Functions

void fromTimespec (const struct timespec &time)
 TimeBase (int64_t secs=0, int32_t nsecs=0)
 TimeBase (const struct timespec &time)

Static Protected Member Functions

static TimeBase maxTime ()

Protected Attributes

int32_t nsecs
int64_t secs

Detailed Description

Repesents time values.

You should not use this class directly. Use the subclasses TimeStamp and TimeSpan instead.

Definition at line 59 of file TimeBase.h.


Constructor & Destructor Documentation

icl_core::TimeBase::TimeBase ( int64_t  secs = 0,
int32_t  nsecs = 0 
) [explicit, protected]

Definition at line 239 of file TimeBase.cpp.

icl_core::TimeBase::TimeBase ( const struct timespec time) [protected]

Definition at line 246 of file TimeBase.cpp.


Member Function Documentation

int64_t icl_core::TimeBase::days ( ) const [inline]

Use this function if you want to express the time in days.

Definition at line 107 of file TimeBase.h.

void icl_core::TimeBase::fromTimespec ( const struct timespec time) [protected]

Definition at line 253 of file TimeBase.cpp.

int64_t icl_core::TimeBase::hours ( ) const [inline]

Use this function if you want to express the time in hours, minutes and seconds.

Definition at line 115 of file TimeBase.h.

TimeBase icl_core::TimeBase::maxTime ( ) [static, protected]

Reimplemented in icl_core::TimeStamp.

Definition at line 232 of file TimeBase.cpp.

Use this function if you want to express the time in hours, minutes, seconds, milliseconds and microseconds.

Definition at line 147 of file TimeBase.h.

Use this function if you want to express the time in hours, minutes, seconds and milliseconds.

Definition at line 139 of file TimeBase.h.

Use this function if you want to express the time in hours, minutes and seconds.

Definition at line 123 of file TimeBase.h.

Use this function if you want to express the time in hours, minutes, seconds, milliseconds, microseconds and nanoseconds.

Definition at line 155 of file TimeBase.h.

Normalizes this time so that the nanosecond part is between 0 and sign(sec)999999999.

Definition at line 83 of file TimeBase.cpp.

bool icl_core::TimeBase::operator!= ( const TimeBase other) const

Compares two variables of type TimeBase.

Returns:
true if they are not equal.

Definition at line 53 of file TimeBase.cpp.

TimeBase & icl_core::TimeBase::operator+= ( const TimeBase span)

Adds a TimeSpan.

Definition at line 37 of file TimeBase.cpp.

TimeBase & icl_core::TimeBase::operator-= ( const TimeBase span)

Substracts a TimeSpan.

Definition at line 45 of file TimeBase.cpp.

bool icl_core::TimeBase::operator< ( const TimeBase other) const

Compares two variables of type TimeBase.

Returns:
true if the first one is earlier than the second one.

Definition at line 63 of file TimeBase.cpp.

bool icl_core::TimeBase::operator<= ( const TimeBase other) const

Compares two variables of type TimeBase.

Returns:
true if the first one is earlier than or equal to the second one.

Definition at line 73 of file TimeBase.cpp.

bool icl_core::TimeBase::operator== ( const TimeBase other) const

Compares two variables of type TimeBase.

Returns:
true if they are equal.

Definition at line 58 of file TimeBase.cpp.

bool icl_core::TimeBase::operator> ( const TimeBase other) const

Compares two variables of type TimeBase.

Returns:
true if the first one is later than the second one.

Definition at line 68 of file TimeBase.cpp.

bool icl_core::TimeBase::operator>= ( const TimeBase other) const

Compares two variables of type TimeBase.

Returns:
true if the first one is later than or equal to the second one.

Definition at line 78 of file TimeBase.cpp.

Use this function if you want to express the time in hours, minutes and seconds.

Definition at line 131 of file TimeBase.h.

Convert to struct timespec. The base time for this conversion is the system clock, which may differ from the world clock on some systems.

Definition at line 121 of file TimeBase.cpp.

int32_t icl_core::TimeBase::tbNSec ( ) const [inline]

Returns the nanosecond part of this time.

Definition at line 163 of file TimeBase.h.

int64_t icl_core::TimeBase::tbSec ( ) const [inline]

Returns the second part of this time.

Definition at line 161 of file TimeBase.h.

struct timespec icl_core::TimeBase::timespec ( ) const [read]

Convert to struct timespec. The base time for this conversion is the global clock (i.e. 0 = 1970-01-01 00:00:00).

Note:
If the native time_t is only 32 bits long then the returned timespec may not equal the original TimeBase.

Definition at line 113 of file TimeBase.cpp.


Member Data Documentation

Definition at line 289 of file TimeBase.h.

Definition at line 288 of file TimeBase.h.


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


schunk_svh_driver
Author(s): Georg Heppner
autogenerated on Fri Aug 28 2015 12:59:20