#include <timeval.hh>
Public Member Functions | |
TimeVal (unsigned sec, unsigned usec) | |
TimeVal (const This &rhs) | |
TimeVal (const ::timeval &rhs) | |
TimeVal (const unsigned period) | |
TimeVal (const int period) | |
TimeVal (const double seconds) | |
int | poll_time () const |
This | operator+ (const This &rhs) const |
This | operator- (const This &rhs) const |
This & | operator+= (const This &rhs) |
bool | operator== (const This &rhs) const |
bool | operator!= (const This &rhs) const |
bool | operator< (const This &rhs) const |
bool | operator<= (const This &rhs) const |
bool | operator> (const This &rhs) const |
bool | operator>= (const This &rhs) const |
float | diff (const This &rhs=now()) const |
This | distance (const This &rhs) const |
bool | is_past (const This &now=now()) const |
This | operator+ (unsigned msec) const |
This & | operator+= (unsigned msec) |
This | operator * (const double &f) const |
This | operator/ (const double &f) const |
This | abs () const |
operator::timeval () const | |
float | to_float () const |
Static Public Member Functions | |
static This | jitter (const This &j) |
static void | set_now (const This &now=TimeVal::real_now()) |
static const TimeVal & | now () |
static const TimeVal | real_now () |
static const TimeVal | in (const This &x) |
static const TimeVal | in_jitter (const This &x) |
Private Types | |
typedef TimeVal | This |
Private Attributes | |
timeval | _tv |
The time stored in timeval data structure. | |
Static Private Attributes | |
static This | _now |
Static time reference. |
This class encapsulates all the required time operations.
|
|
|
Constructor.
|
|
Copy constructor. |
|
Copy constructor from timeval standard data structure. |
|
Constructor from period in milliseconds. |
|
Constructor from period in milliseconds. Provided for convenience. |
|
Constructor from floating point second count. |
|
Absolute value operator. |
|
|
|
Absolute difference computation method. |
|
Static convenience future time calculation.
|
|
Static convenience future jitter time calculation.
|
|
Realistic comparison operator. This takes into account the jitter in signal delivery time. FIXME: this should not be necessary, according to the specifications, but seems to be according to experiments.
|
|
Jitter calculation.
|
|
Static accessor to current time reference. |
|
External multiplication with double. |
|
|
|
External addition with integer number of milliseconds. |
|
Internal addition. |
|
External self-addition with integer number of milliseconds. |
|
Internal self-addition. |
|
Internal subtraction. |
|
External division with double. |
|
Conversion operator to timeval data structure. |
|
Comparison operator. |
|
Comparison operator. |
|
Equality operator. |
|
Comparison operator. |
|
Comparison operator. |
|
|
|
Static accessor to current system time. |
|
Clock stepping. Called once in a while to set current time. |
|
Method to convert to floating point number of seconds. |
|
Static time reference.
|
|
The time stored in timeval data structure.
|