#include <OS.h>
Collaboration diagram for ACE_Time_Value:
Public Methods | |
ACE_Time_Value (void) | |
Default Constructor. | |
ACE_Time_Value (long sec, long usec = 0) | |
Constructor. | |
ACE_Time_Value (const struct timeval &t) | |
Construct the from a <timeval>. | |
ACE_Time_Value (const timespec_t &t) | |
Initializes the object from a <timespec_t>. | |
ACE_Time_Value (const ACE_Time_Value &tv) | |
Copy constructor. | |
ACE_Time_Value (const FILETIME &ft) | |
Initializes the ACE_Time_Value object from a Win32 FILETIME. | |
void | set (long sec, long usec) |
Construct a <Time_Value> from two <long>s. | |
void | set (double d) |
Construct a <Time_Value> from a <double>, which is assumed to be in second format, with any remainder treated as microseconds. | |
void | set (const timeval &t) |
Construct a <Time_Value> from a <timeval>. | |
void | set (const timespec_t &t) |
Initializes the <Time_Value> object from a <timespec_t>. | |
void | set (const FILETIME &ft) |
Initializes the <Time_Value> object from a <timespec_t>. | |
long | msec (void) const |
Converts from <Time_Value> format into milli-seconds format. | |
void | msec (long) |
Converts from milli-seconds format into <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. | |
void | operator+= (const ACE_Time_Value &tv) |
Add <tv> to this. | |
void | operator-= (const ACE_Time_Value &tv) |
Subtract <tv> to this. | |
ACE_Time_Value& | operator *= (double d) |
Multiply the time value by the <d> factor, which must be >= 0. | |
void | dump (void) const |
Dump the state of an object. | |
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 Methods | |
void | normalize (void) |
Put the timevalue into a canonical form. | |
Private Attributes | |
timeval | tv_ |
Store the values as a <timeval>. | |
Friends | |
ACE_OS_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_OS_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_OS_Export int | operator< (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
True if tv1 < tv2. | |
ACE_OS_Export int | operator> (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
True if tv1 > tv2. | |
ACE_OS_Export int | operator<= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
True if tv1 <= tv2. | |
ACE_OS_Export int | operator>= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
True if tv1 >= tv2. | |
ACE_OS_Export int | operator== (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
True if tv1 == tv2. | |
ACE_OS_Export int | operator!= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) |
True if tv1 != tv2. |
This class centralizes all the time related processing in ACE. These timers are typically used in conjunction with OS mechanisms like <select>, <poll>, or <cond_timedwait>. makes the use of these mechanisms portable across OS platforms,
|
Default Constructor.
|
|
Constructor.
|
|
Construct the from a <timeval>.
|
|
Initializes the object from a <timespec_t>.
|
|
Copy constructor.
|
|
Initializes the ACE_Time_Value object from a Win32 FILETIME.
|
|
Dump the state of an object.
|
|
Converts from milli-seconds format into <Time_Value> format.
|
|
Converts from <Time_Value> format into milli-seconds format.
|
|
Put the timevalue into a canonical form.
|
|
Multiply the time value by the <d> factor, which must be >= 0.
|
|
Returns the value of the object as a Win32 FILETIME.
|
|
Returns a pointer to the object as a <timeval>.
|
|
Returns the value of the object as a <timespec_t>.
|
|
Returns the value of the object as a <timeval>.
|
|
Add <tv> to this.
|
|
Subtract <tv> to this.
|
|
Set seconds.
|
|
Get seconds.
|
|
Initializes the <Time_Value> object from a <timespec_t>.
|
|
Initializes the <Time_Value> object from a <timespec_t>.
|
|
Construct a <Time_Value> from a <timeval>.
|
|
Construct a <Time_Value> from a <double>, which is assumed to be in second format, with any remainder treated as microseconds.
|
|
Construct a <Time_Value> from two <long>s.
|
|
Set microseconds.
|
|
Get microseconds.
|
|
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.
|
|
Const time difference between FILETIME and POSIX time.
|
|
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 class. |
|
Store the values as a <timeval>.
|
|
Constant "0".
|