TimeET Class Reference#include <TimeET.h>
List of all members.
Detailed Description
a nice class for handling time values with high precision
Definition at line 23 of file TimeET.h.
|
Public Member Functions |
TimeET | Age () const |
| returns the difference between the current time and the time stored
|
|
| TimeET () |
| constructor
|
| TimeET (long ms) |
| constructor
|
| TimeET (long sec, long usec) |
| constructor
|
| TimeET (double t) |
| constructor, sepecify t seconds
|
|
double | Value () const |
| returns the time stored as seconds in a double
|
|
void | Set (long ms) |
| sets the time stored in the class
|
void | Set (long sec, long usec) |
| sets the time stored in the class
|
void | Set (double t) |
| sets the time stored in the class
|
void | Set () |
| sets the time to the current time
|
|
bool | operator< (long ms) const |
| for comparing times
|
bool | operator< (double t) const |
| for comparing times
|
bool | operator< (const TimeET &t) const |
| for comparing times
|
|
TimeET | operator+ (const TimeET &t) const |
| for doing doing math with time
|
TimeET | operator+= (const TimeET &t) |
| for doing doing math with time
|
TimeET | operator- (const TimeET &t) const |
| for doing doing math with time
|
TimeET | operator-= (const TimeET &t) |
| for doing doing math with time
|
Static Public Attributes |
static const long | us_per_sec = 1000000 |
| conversion factor for microseconds to seconds
|
static const long | ms_per_sec = 1000 |
| conversion factor for milliseconds to seconds
|
static const long | us_per_ms = 1000 |
| conversion factor for microseconds to milliseconds
|
Protected Attributes |
timeval | tv |
| stores the time
|
Static Protected Attributes |
static struct timezone | tz |
| stores the timezone (not really used)
|
Friends |
std::ostream & | operator<< (std::ostream &o, const TimeET &t) |
| lets the class be displayed easily
|
Constructor & Destructor Documentation
TimeET::TimeET |
( |
|
) |
[inline] |
|
TimeET::TimeET |
( |
long |
ms |
) |
[inline] |
|
|
constructor
Definition at line 32 of file TimeET.h. |
TimeET::TimeET |
( |
long |
sec, |
|
|
long |
usec |
|
) |
[inline] |
|
|
constructor
Definition at line 35 of file TimeET.h. |
TimeET::TimeET |
( |
double |
t |
) |
[inline] |
|
|
constructor, sepecify t seconds
Definition at line 39 of file TimeET.h. |
Member Function Documentation
TimeET TimeET::Age |
( |
|
) |
const [inline] |
|
TimeET TimeET::operator+ |
( |
const TimeET & |
t |
) |
const [inline] |
|
|
for doing doing math with time
Definition at line 93 of file TimeET.h. |
|
for doing doing math with time
Definition at line 99 of file TimeET.h. |
TimeET TimeET::operator- |
( |
const TimeET & |
t |
) |
const [inline] |
|
|
for doing doing math with time
Definition at line 105 of file TimeET.h. |
|
for doing doing math with time
Definition at line 115 of file TimeET.h. |
bool TimeET::operator< |
( |
const TimeET & |
t |
) |
const [inline] |
|
|
for comparing times
Definition at line 86 of file TimeET.h. |
bool TimeET::operator< |
( |
double |
t |
) |
const [inline] |
|
|
for comparing times
Definition at line 83 of file TimeET.h. |
bool TimeET::operator< |
( |
long |
ms |
) |
const [inline] |
|
|
for comparing times
Definition at line 79 of file TimeET.h. |
void TimeET::Set |
( |
|
) |
[inline] |
|
|
sets the time to the current time
- Todo:
- not getting timeofday on OPEN-R, is time since boot instead...
Definition at line 66 of file TimeET.h.
Referenced by Set(), and TimeET(). |
void TimeET::Set |
( |
double |
t |
) |
[inline] |
|
|
sets the time stored in the class
Definition at line 60 of file TimeET.h. |
void TimeET::Set |
( |
long |
sec, |
|
|
long |
usec |
|
) |
[inline] |
|
|
sets the time stored in the class
Definition at line 56 of file TimeET.h. |
void TimeET::Set |
( |
long |
ms |
) |
[inline] |
|
double TimeET::Value |
( |
|
) |
const [inline] |
|
Friends And Related Function Documentation
std::ostream& operator<< |
( |
std::ostream & |
o, |
|
|
const TimeET & |
t |
|
) |
[friend] |
|
|
lets the class be displayed easily
Definition at line 142 of file TimeET.h. |
Member Data Documentation
|
conversion factor for milliseconds to seconds
Definition at line 128 of file TimeET.h.
Referenced by operator<(). |
|
stores the timezone (not really used)
Definition at line 132 of file TimeET.h.
Referenced by Set(). |
The documentation for this class was generated from the following file:
|