#include <timeval_decls.h>
Public Member Functions | |
Timeval () | |
Construct an uninitialized(!) Timeval. | |
Timeval (const timeval &o) | |
Construct a Timeval by copying a timeval instance. | |
Timeval (void *) | |
This constructor uses an ignored dummy parameter to initialize with gettimeofday(). | |
Timeval (time_t sec) | |
Construct a Timeval by setting it to sec seconds. | |
Timeval (time_t sec, suseconds_t usec) | |
Construct a Timeval by setting it to sec + 0.000001 * usec. | |
Timeval (float sec) | |
Construct a Timeval by setting it to sec. | |
Timeval (double sec) | |
Construct a Timeval by setting it to sec. | |
Timeval & | operator= (const timeval &o) |
Assigns o to this Timeval. | |
Timeval & | operator= (time_t sec) |
Assigns sec to this Timeval. | |
Timeval & | operator= (float sec) |
Assigns sec to this Timeval. | |
Timeval & | operator= (double sec) |
Assigns sec to this Timeval. | |
Timeval & | gettimeofday () |
Sets this to the current time by invoking gettimeofday. | |
operator time_t () const | |
Converts Timeval to time_t by rounding down to seconds. | |
operator float () const | |
Converts Timeval to float. | |
operator double () const | |
Converts Timeval to double. | |
unsigned int | milliseconds () const |
Converts Timeval to an unsigned int of milliseconds. | |
bool | operator> (const timeval &o) const |
Checks whether this is larger than o. | |
bool | operator>= (const timeval &o) const |
Checks whether this is larger than or equal to o. | |
bool | operator== (const timeval &o) const |
Checks whether this is equal to o. | |
bool | operator<= (const timeval &o) const |
Checks whether this is smaller than or equal to o. | |
bool | operator< (const timeval &o) const |
Checks whether this is smaller than o. | |
bool | operator!= (const timeval &o) const |
Checks whether this is not equal to o. | |
Timeval | operator+ (const timeval &o) const |
Returns the sum of this and o. | |
Timeval | operator+ (time_t sec) const |
Returns the sum of this and sec. | |
Timeval | operator+ (float sec) const |
Returns the sum of this and sec. | |
Timeval | operator+ (double sec) const |
Returns the sum of this and sec. | |
Timeval & | operator+= (const timeval &o) |
Adds o to this Timeval. | |
Timeval & | operator+= (time_t sec) |
Adds sec in seconds to this Timeval. | |
Timeval & | operator+= (float sec) |
Adds sec in seconds to this Timeval. | |
Timeval & | operator+= (double sec) |
Adds sec in seconds to this Timeval. | |
Timeval | operator- (const timeval &o) const |
Returns the difference of this and o. | |
Timeval | operator- (time_t sec) const |
Returns the difference of this and sec. | |
Timeval | operator- (float sec) const |
Returns the difference of this and sec. | |
Timeval | operator- (double sec) const |
Returns the difference of this and sec. | |
Timeval & | operator-= (const timeval &o) |
Substracts o from this Timeval. | |
Timeval & | operator-= (time_t sec) |
Substracts sec seconds from this Timeval. | |
Timeval & | operator-= (float sec) |
Substracts sec seconds from this Timeval. | |
Timeval & | operator-= (double sec) |
Substracts sec seconds from this Timeval. |
Timeval::Timeval | ( | const timeval & | o | ) | [inline] |
Timeval::Timeval | ( | void * | ) | [inline] |
This constructor uses an ignored dummy parameter to initialize with gettimeofday().
The macro TimevalNow should be passed to use this constructor.
Timeval::Timeval | ( | time_t | sec | ) | [inline] |
Construct a Timeval by setting it to sec seconds.
sec | time in seconds to initialize with |
Timeval::Timeval | ( | time_t | sec, | |
suseconds_t | usec | |||
) | [inline] |
Construct a Timeval by setting it to sec + 0.000001 * usec.
sec | time in seconds | |
usec | time in microseconds |
Timeval::Timeval | ( | float | sec | ) | [inline] |
Timeval::Timeval | ( | double | sec | ) | [inline] |
Timeval & Timeval::operator= | ( | const timeval & | o | ) | [inline] |
Timeval & Timeval::operator= | ( | time_t | sec | ) | [inline] |
Timeval & Timeval::operator= | ( | float | sec | ) | [inline] |
Timeval & Timeval::operator= | ( | double | sec | ) | [inline] |
Timeval & Timeval::gettimeofday | ( | ) | [inline] |
Sets this to the current time by invoking gettimeofday.
Timeval::operator time_t | ( | ) | const [inline] |
Timeval::operator float | ( | ) | const [inline] |
Timeval::operator double | ( | ) | const [inline] |
unsigned int Timeval::milliseconds | ( | ) | const [inline] |
bool Timeval::operator> | ( | const timeval & | o | ) | const [inline] |
Checks whether this is larger than o.
o | the timeval to compare with |
bool Timeval::operator>= | ( | const timeval & | o | ) | const [inline] |
Checks whether this is larger than or equal to o.
o | the timeval to compare with |
bool Timeval::operator== | ( | const timeval & | o | ) | const [inline] |
Checks whether this is equal to o.
This will as with floats almost always give false.
o | the timeval to compare with |
bool Timeval::operator<= | ( | const timeval & | o | ) | const [inline] |
Checks whether this is smaller than or equal to o.
o | the timeval to compare with |
bool Timeval::operator< | ( | const timeval & | o | ) | const [inline] |
Checks whether this is smaller than o.
o | the timeval to compare with |
bool Timeval::operator!= | ( | const timeval & | o | ) | const [inline] |
Checks whether this is not equal to o.
This will as with floats almost always give true.
o | the timeval to compare with |
Timeval Timeval::operator+ | ( | const timeval & | o | ) | const [inline] |
Returns the sum of this and o.
Neither this nor o will be modified.
o | is the timeval to be added |
Timeval Timeval::operator+ | ( | time_t | sec | ) | const [inline] |
Returns the sum of this and sec.
Neither this nor sec will be modified.
sec | is the time in seconds to be added |
Timeval Timeval::operator+ | ( | float | sec | ) | const [inline] |
Returns the sum of this and sec.
Neither this nor sec will be modified.
sec | is the time in seconds to be added |
Timeval Timeval::operator+ | ( | double | sec | ) | const [inline] |
Returns the sum of this and sec.
Neither this nor sec will be modified.
sec | is the time in seconds to be added |
Timeval & Timeval::operator+= | ( | const timeval & | o | ) | [inline] |
Timeval & Timeval::operator+= | ( | time_t | sec | ) | [inline] |
Adds sec in seconds to this Timeval.
sec | is the time in seconds to add |
Timeval & Timeval::operator+= | ( | float | sec | ) | [inline] |
Adds sec in seconds to this Timeval.
sec | is the time in seconds to add |
Timeval & Timeval::operator+= | ( | double | sec | ) | [inline] |
Adds sec in seconds to this Timeval.
sec | is the time in seconds to add |
Timeval Timeval::operator- | ( | const timeval & | o | ) | const [inline] |
Returns the difference of this and o.
The result is undefined if this < o. Neither this nor o will be modified.
o | is the timeval to be substracted |
Timeval Timeval::operator- | ( | time_t | sec | ) | const [inline] |
Returns the difference of this and sec.
The result is undefined if this < sec. Neither this nor sec will be modified.
sec | is the time in seconds to be substracted |
Timeval Timeval::operator- | ( | float | sec | ) | const [inline] |
Returns the difference of this and sec.
The result is undefined if this < sec. Neither this nor sec will be modified.
sec | is the time in seconds to be substracted |
Timeval Timeval::operator- | ( | double | sec | ) | const [inline] |
Returns the difference of this and sec.
The result is undefined if this < sec. Neither this nor sec will be modified.
sec | is the time in seconds to be substracted |
Timeval & Timeval::operator-= | ( | const timeval & | o | ) | [inline] |
Timeval & Timeval::operator-= | ( | time_t | sec | ) | [inline] |
Substracts sec seconds from this Timeval.
sec | is the time in seconds to be substracted |
Timeval & Timeval::operator-= | ( | float | sec | ) | [inline] |
Substracts sec seconds from this Timeval.
sec | is the time in seconds to be substracted |
Timeval & Timeval::operator-= | ( | double | sec | ) | [inline] |
Substracts sec seconds from this Timeval.
sec | is the time in seconds to be substracted |