#include <Time_Value.h>
Collaboration diagram for ACE_Time_Value:
Public Member Functions | |
ACE_Time_Value (void) | |
Default Constructor. | |
ACE_Time_Value (long sec, long 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 (long sec, long usec) |
Initializes the ACE_Time_Value from two longs. | |
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 milli-seconds format. | |
void | msec (ACE_UINT64 &ms) const |
void | msec (long) |
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. | |
long | sec (void) const |
Get seconds. | |
void | sec (long sec) |
Set seconds. | |
long | usec (void) const |
Get microseconds. | |
void | usec (long usec) |
Set microseconds. | |
ACE_Time_Value & | operator+= (const ACE_Time_Value &tv) |
Add tv to this. | |
ACE_Time_Value & | operator= (const ACE_Time_Value &tv) |
Assign @ tv to this. | |
ACE_Time_Value & | operator-= (const ACE_Time_Value &tv) |
Subtract 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 | |
const ACE_Time_Value | zero |
Constant "0". | |
const ACE_Time_Value | max_time |
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>.
|
Default Constructor.
|
|
Constructor.
|
|
Construct the ACE_Time_Value from a timeval.
|
|
Construct the ACE_Time_Value object from a timespec_t.
|
|
Construct the ACE_Time_Value object from a Win32 FILETIME.
|
|
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 |
|
Converts from milli-seconds format into ACE_Time_Value format.
|
|
|
|
Converts from ACE_Time_Value format into milli-seconds format.
|
|
Put the timevalue into a canonical form.
|
|
Multiply the time value by the d factor.
|
|
Returns a pointer to the object as a timeval.
|
|
Returns the value of the object as a Win32 FILETIME.
|
|
Returns the value of the object as a timespec_t.
|
|
Returns the value of the object as a timeval.
|
|
Increment microseconds as prefix.
|
|
Increment microseconds as postfix.
|
|
Add tv to this.
|
|
Decrement microseconds as prefix.
|
|
Decrement microseconds as postfix.
|
|
Subtract tv to this.
|
|
Assign @ tv to this.
|
|
Set seconds.
|
|
Get seconds.
|
|
Initializes the ACE_Time_Value object from a Win32 FILETIME.
|
|
Initializes the ACE_Time_Value object from a timespec_t.
|
|
Initializes the ACE_Time_Value from a timeval.
|
|
Initializes the ACE_Time_Value from a double, which is assumed to be in second format, with any remainder treated as microseconds. |
|
Initializes the ACE_Time_Value from two longs.
|
|
Set microseconds.
|
|
Get microseconds.
|
|
Multiplies the time value by d.
|
|
Multiplies the time value by d.
|
|
True if tv1 != tv2.
|
|
Adds two ACE_Time_Value objects together, returns the sum.
|
|
Subtracts two ACE_Time_Value objects, returns the difference.
|
|
True if tv1 < tv2.
|
|
True if tv1 <= tv2.
|
|
True if tv1 == tv2.
|
|
True if tv1 > tv2.
|
|
True if tv1 >= tv2.
|
|
Initial value: ACE_INT64_LITERAL (0x19db1ded53e8000)
|
|
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. |
|
Store the values as a timeval.
|
|
Constant "0".
|