#include <Time_Value.h>

Public Member Functions | |
| ACE_Time_Value (void) | |
| Default Constructor. | |
| ACE_Time_Value (time_t sec, suseconds_t usec=0) | |
| Constructor. | |
| ACE_Time_Value (const struct timeval &t) | |
| Construct the ACE_Time_Value from a timeval. | |
| ACE_Time_Value (const timespec_t &t) | |
| Construct the ACE_Time_Value object from a timespec_t. | |
| ACE_Time_Value (const FILETIME &ft) | |
| Construct the ACE_Time_Value object from a Win32 FILETIME. | |
| void | set (time_t sec, suseconds_t usec) |
| Initializes the ACE_Time_Value from seconds and useconds. | |
| void | set (double d) |
| void | set (const timeval &t) |
| Initializes the ACE_Time_Value from a timeval. | |
| void | set (const timespec_t &t) |
| Initializes the ACE_Time_Value object from a timespec_t. | |
| void | set (const FILETIME &ft) |
| Initializes the ACE_Time_Value object from a Win32 FILETIME. | |
| unsigned long | msec (void) const |
| Converts from ACE_Time_Value format into milliseconds format. | |
| void | msec (ACE_UINT64 &ms) const |
| Converts from ACE_Time_Value format into milliseconds format. | |
| void | msec (ACE_UINT64 &ms) |
| Converts from ACE_Time_Value format into milliseconds format. | |
| void | msec (long) |
| Converts from milli-seconds format into ACE_Time_Value format. | |
| void | msec (int) |
| Converts from milli-seconds format into ACE_Time_Value format. | |
| operator timespec_t () const | |
| Returns the value of the object as a timespec_t. | |
| operator timeval () const | |
| Returns the value of the object as a timeval. | |
| operator const timeval * () const | |
| Returns a pointer to the object as a timeval. | |
| operator FILETIME () const | |
| Returns the value of the object as a Win32 FILETIME. | |
| time_t | sec (void) const |
| Get seconds. | |
| void | sec (time_t sec) |
| Set seconds. | |
| suseconds_t | usec (void) const |
| Get microseconds. | |
| void | usec (suseconds_t usec) |
| Set microseconds. | |
| void | to_usec (ACE_UINT64 &usec) const |
| ACE_Time_Value & | operator+= (const ACE_Time_Value &tv) |
| Add tv to this. | |
| ACE_Time_Value & | operator+= (time_t tv) |
| Add tv to this. | |
| ACE_Time_Value & | operator= (const ACE_Time_Value &tv) |
| Assign @ tv to this. | |
| ACE_Time_Value & | operator= (time_t tv) |
| Assign @ tv to this. | |
| ACE_Time_Value & | operator-= (const ACE_Time_Value &tv) |
| Subtract tv to this. | |
| ACE_Time_Value & | operator-= (time_t tv) |
| Substract tv to this. | |
| ACE_Time_Value & | operator*= (double d) |
| Multiply the time value by the d factor. | |
| ACE_Time_Value | operator++ (int) |
| Increment microseconds as postfix. | |
| ACE_Time_Value & | operator++ (void) |
| Increment microseconds as prefix. | |
| ACE_Time_Value | operator-- (int) |
| Decrement microseconds as postfix. | |
| ACE_Time_Value & | operator-- (void) |
| Decrement microseconds as prefix. | |
| void | dump (void) const |
| Dump is a no-op. | |
Static Public Attributes | |
| static const ACE_Time_Value | zero |
| Constant "0". | |
| static const ACE_Time_Value | max_time |
| static const DWORDLONG | FILETIME_to_timval_skew |
| Const time difference between FILETIME and POSIX time. | |
Private Member Functions | |
| void | normalize (void) |
| Put the timevalue into a canonical form. | |
Private Attributes | |
| timeval | tv_ |
| Store the values as a timeval. | |
Friends | |
| ACE_Export ACE_Time_Value | operator+ (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
| Adds two ACE_Time_Value objects together, returns the sum. | |
| ACE_Export ACE_Time_Value | operator- (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
| Subtracts two ACE_Time_Value objects, returns the difference. | |
| ACE_Export bool | operator< (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
| True if tv1 < tv2. | |
| ACE_Export bool | operator> (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
| True if tv1 > tv2. | |
| ACE_Export bool | operator<= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
| True if tv1 <= tv2. | |
| ACE_Export bool | operator>= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
| True if tv1 >= tv2. | |
| ACE_Export bool | operator== (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
| True if tv1 == tv2. | |
| ACE_Export bool | operator!= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
| True if tv1 != tv2. | |
| ACE_Export ACE_Time_Value | operator* (double d, const ACE_Time_Value &tv) |
| Multiplies the time value by d. | |
| ACE_Export ACE_Time_Value | operator* (const ACE_Time_Value &tv, double d) |
| Multiplies the time value by d. | |
This class centralizes all the time related processing in ACE. These time values are typically used in conjunction with OS mechanisms like <select>, <poll>, or <cond_timedwait>.
| ACE_Time_Value::ACE_Time_Value | ( | void | ) | [inline] |
Default Constructor.
| ACE_Time_Value::ACE_Time_Value | ( | time_t | sec, | |
| suseconds_t | usec = 0 | |||
| ) | [inline, explicit] |
Constructor.
| ACE_Time_Value::ACE_Time_Value | ( | const struct timeval & | t | ) | [inline, explicit] |
Construct the ACE_Time_Value from a timeval.
| ACE_Time_Value::ACE_Time_Value | ( | const timespec_t & | t | ) | [inline, explicit] |
Construct the ACE_Time_Value object from a timespec_t.
| ACE_Time_Value::ACE_Time_Value | ( | const FILETIME & | ft | ) | [explicit] |
Construct the ACE_Time_Value object from a Win32 FILETIME.
| void ACE_Time_Value::dump | ( | void | ) | const |
Dump is a no-op.
The dump() method is a no-op. It's here for backwards compatibility only, but does not dump anything. Invoking logging methods here violates layering restrictions in ACE because this class is part of the OS layer and ACE_Log_Msg is at a higher level.
| void ACE_Time_Value::msec | ( | int | milliseconds | ) | [inline] |
Converts from milli-seconds format into ACE_Time_Value format.
| void ACE_Time_Value::msec | ( | long | milliseconds | ) | [inline] |
Converts from milli-seconds format into ACE_Time_Value format.
| void ACE_Time_Value::msec | ( | ACE_UINT64 & | ms | ) | [inline] |
Converts from ACE_Time_Value format into milliseconds format.
| ms | parameter. |
| void ACE_Time_Value::msec | ( | ACE_UINT64 & | ms | ) | const [inline] |
Converts from ACE_Time_Value format into milliseconds format.
| ms | parameter. |
| unsigned long ACE_Time_Value::msec | ( | void | ) | const [inline] |
Converts from ACE_Time_Value format into milliseconds format.
| void ACE_Time_Value::normalize | ( | void | ) | [private] |
| ACE_Time_Value::operator const timeval * | ( | ) | const [inline] |
Returns a pointer to the object as a timeval.
| ACE_Time_Value::operator FILETIME | ( | ) | const |
Returns the value of the object as a Win32 FILETIME.
| ACE_Time_Value::operator timespec_t | ( | ) | const [inline] |
Returns the value of the object as a timespec_t.
| ACE_Time_Value::operator timeval | ( | ) | const [inline] |
Returns the value of the object as a timeval.
| ACE_Time_Value & ACE_Time_Value::operator*= | ( | double | d | ) |
Multiply the time value by the d factor.
| ACE_Time_Value & ACE_Time_Value::operator++ | ( | void | ) |
Increment microseconds as prefix.
| ACE_Time_Value ACE_Time_Value::operator++ | ( | int | ) |
Increment microseconds as postfix.
| ACE_Time_Value & ACE_Time_Value::operator+= | ( | time_t | tv | ) | [inline] |
Add tv to this.
| ACE_Time_Value & ACE_Time_Value::operator+= | ( | const ACE_Time_Value & | tv | ) | [inline] |
Add tv to this.
| ACE_Time_Value & ACE_Time_Value::operator-- | ( | void | ) |
Decrement microseconds as prefix.
| ACE_Time_Value ACE_Time_Value::operator-- | ( | int | ) |
Decrement microseconds as postfix.
| ACE_Time_Value & ACE_Time_Value::operator-= | ( | time_t | tv | ) | [inline] |
Substract tv to this.
| ACE_Time_Value & ACE_Time_Value::operator-= | ( | const ACE_Time_Value & | tv | ) | [inline] |
Subtract tv to this.
| ACE_Time_Value & ACE_Time_Value::operator= | ( | time_t | tv | ) | [inline] |
Assign @ tv to this.
| ACE_Time_Value & ACE_Time_Value::operator= | ( | const ACE_Time_Value & | tv | ) | [inline] |
Assign @ tv to this.
| void ACE_Time_Value::sec | ( | time_t | sec | ) | [inline] |
Set seconds.
| time_t ACE_Time_Value::sec | ( | void | ) | const [inline] |
Get seconds.
| void ACE_Time_Value::set | ( | const FILETIME & | ft | ) |
Initializes the ACE_Time_Value object from a Win32 FILETIME.
| void ACE_Time_Value::set | ( | const timespec_t & | t | ) | [inline] |
Initializes the ACE_Time_Value object from a timespec_t.
| void ACE_Time_Value::set | ( | const timeval & | t | ) | [inline] |
Initializes the ACE_Time_Value from a timeval.
| void ACE_Time_Value::set | ( | double | d | ) | [inline] |
Initializes the ACE_Time_Value from a double, which is assumed to be in second format, with any remainder treated as microseconds.
| void ACE_Time_Value::set | ( | time_t | sec, | |
| suseconds_t | usec | |||
| ) | [inline] |
Initializes the ACE_Time_Value from seconds and useconds.
| void ACE_Time_Value::to_usec | ( | ACE_UINT64 & | usec | ) | const [inline] |
| usec | parameter. |
| void ACE_Time_Value::usec | ( | suseconds_t | usec | ) | [inline] |
Set microseconds.
| suseconds_t ACE_Time_Value::usec | ( | void | ) | const [inline] |
Get microseconds.
| ACE_Export bool operator!= | ( | const ACE_Time_Value & | tv1, | |
| const ACE_Time_Value & | tv2 | |||
| ) | [friend] |
True if tv1 != tv2.
| ACE_Export ACE_Time_Value operator* | ( | const ACE_Time_Value & | tv, | |
| double | d | |||
| ) | [friend] |
Multiplies the time value by d.
| ACE_Export ACE_Time_Value operator* | ( | double | d, | |
| const ACE_Time_Value & | tv | |||
| ) | [friend] |
Multiplies the time value by d.
| ACE_Export ACE_Time_Value operator+ | ( | const ACE_Time_Value & | tv1, | |
| const ACE_Time_Value & | tv2 | |||
| ) | [friend] |
Adds two ACE_Time_Value objects together, returns the sum.
| ACE_Export ACE_Time_Value operator- | ( | const ACE_Time_Value & | tv1, | |
| const ACE_Time_Value & | tv2 | |||
| ) | [friend] |
Subtracts two ACE_Time_Value objects, returns the difference.
| ACE_Export bool operator< | ( | const ACE_Time_Value & | tv1, | |
| const ACE_Time_Value & | tv2 | |||
| ) | [friend] |
True if tv1 < tv2.
| ACE_Export bool operator<= | ( | const ACE_Time_Value & | tv1, | |
| const ACE_Time_Value & | tv2 | |||
| ) | [friend] |
True if tv1 <= tv2.
| ACE_Export bool operator== | ( | const ACE_Time_Value & | tv1, | |
| const ACE_Time_Value & | tv2 | |||
| ) | [friend] |
True if tv1 == tv2.
| ACE_Export bool operator> | ( | const ACE_Time_Value & | tv1, | |
| const ACE_Time_Value & | tv2 | |||
| ) | [friend] |
True if tv1 > tv2.
| ACE_Export bool operator>= | ( | const ACE_Time_Value & | tv1, | |
| const ACE_Time_Value & | tv2 | |||
| ) | [friend] |
True if tv1 >= tv2.
const DWORDLONG ACE_Time_Value::FILETIME_to_timval_skew [static] |
Initial value:
ACE_INT64_LITERAL (0x19db1ded53e8000)
const ACE_Time_Value ACE_Time_Value::max_time [static] |
Constant for maximum time representable. Note that this time is not intended for use with <select> or other calls that may have *their own* implementation-specific maximum time representations. Its primary use is in time computations such as those used by the dynamic subpriority strategies in the ACE_Dynamic_Message_Queue class.
timeval ACE_Time_Value::tv_ [private] |
Store the values as a timeval.
const ACE_Time_Value ACE_Time_Value::zero [static] |
Constant "0".
1.5.8