ACE  6.3.3
Public Types | Public Member Functions | Private Attributes | List of all members
ACE_Time_Value_T< TIME_POLICY > Class Template Reference

#include <Time_Value_T.h>

Inheritance diagram for ACE_Time_Value_T< TIME_POLICY >:
Inheritance graph
[legend]
Collaboration diagram for ACE_Time_Value_T< TIME_POLICY >:
Collaboration graph
[legend]

Public Types

typedef TIME_POLICY time_policy_t
 

Public Member Functions

 ACE_Time_Value_T (void)
 Default Constructor. More...
 
 ACE_Time_Value_T (time_t sec, suseconds_t usec=0)
 Constructor. More...
 
 ACE_Time_Value_T (const struct timeval &t)
 Construct the ACE_Time_Value from a timeval. More...
 
 ACE_Time_Value_T (const timespec_t &t)
 Construct the ACE_Time_Value object from a timespec_t. More...
 
 ACE_Time_Value_T (const ACE_Time_Value_T< TIME_POLICY > &tv)
 Construct from ACE_Time_Value_T<TIME_POLICY> More...
 
 ACE_Time_Value_T (const ACE_Time_Value &tv, const TIME_POLICY &tp=TIME_POLICY())
 Construct from ACE_Time_Value. More...
 
virtual ~ACE_Time_Value_T ()
 Destructor. More...
 
ACE_Time_Value_T< TIME_POLICY > & operator+= (const ACE_Time_Value &tv)
 Add tv to this. More...
 
ACE_Time_Value_T< TIME_POLICY > & operator+= (time_t tv)
 Add tv to this. More...
 
ACE_Time_Value_T< TIME_POLICY > & operator= (const ACE_Time_Value_T< TIME_POLICY > &tv)
 Assign @ tv to this. More...
 
ACE_Time_Value_T< TIME_POLICY > & operator= (const ACE_Time_Value &tv)
 Assign @ tv to this. More...
 
ACE_Time_Value_T< TIME_POLICY > & operator= (time_t tv)
 Assign @ tv to this. More...
 
ACE_Time_Value_T< TIME_POLICY > & operator-= (const ACE_Time_Value &tv)
 Subtract tv to this. More...
 
ACE_Time_Value_T< TIME_POLICY > & operator-= (time_t tv)
 Subtract tv to this. More...
 
ACE_Time_Value_T< TIME_POLICY > & operator*= (double d)
 Multiply the time value by the d factor. More...
 
ACE_Time_Value_T< TIME_POLICY > operator++ (int)
 Increment microseconds as postfix. More...
 
ACE_Time_Value_T< TIME_POLICY > & operator++ (void)
 Increment microseconds as prefix. More...
 
ACE_Time_Value_T< TIME_POLICY > operator-- (int)
 Decrement microseconds as postfix. More...
 
ACE_Time_Value_T< TIME_POLICY > & operator-- (void)
 Decrement microseconds as prefix. More...
 
virtual ACE_Time_Value now () const
 Get current time of day according to time policy. More...
 
virtual ACE_Time_Value to_relative_time () const
 Converts absolute time value to time value relative to current time of day. More...
 
virtual ACE_Time_Value to_absolute_time () const
 Converts relative time value to absolute time value based on current time of day. More...
 
virtual ACE_Time_Valueduplicate () const
 Duplicates this time value (incl. time policy). More...
 
- Public Member Functions inherited from ACE_Time_Value
 ACE_Time_Value (void)
 Default Constructor. More...
 
 ACE_Time_Value (time_t sec, suseconds_t usec=0)
 Constructor. More...
 
 ACE_Time_Value (const struct timeval &t)
 Construct the ACE_Time_Value from a timeval. More...
 
 ACE_Time_Value (const timespec_t &t)
 Construct the ACE_Time_Value object from a timespec_t. More...
 
virtual ~ACE_Time_Value ()
 Destructor. More...
 
 ACE_Time_Value (const FILETIME &ft)
 Construct the ACE_Time_Value object from a Win32 FILETIME. More...
 
void set (time_t sec, suseconds_t usec)
 Initializes the ACE_Time_Value from seconds and useconds. More...
 
void set (double d)
 
void set (const timeval &t)
 Initializes the ACE_Time_Value from a timeval. More...
 
void set (const timespec_t &t)
 Initializes the ACE_Time_Value object from a timespec_t. More...
 
void set (const FILETIME &ft)
 Initializes the ACE_Time_Value object from a Win32 FILETIME. More...
 
unsigned long msec (void) const
 Converts from ACE_Time_Value format into milliseconds format. More...
 
ACE_UINT64 get_msec () const
 Converts from ACE_Time_Value format into milliseconds format. More...
 
void msec (ACE_UINT64 &ms) const
 Converts from ACE_Time_Value format into milliseconds format. More...
 
void msec (ACE_UINT64 &ms)
 Converts from ACE_Time_Value format into milliseconds format. More...
 
void set_msec (const ACE_UINT64 &ms)
 Converts from milli-seconds format into ACE_Time_Value format. More...
 
void msec (long)
 Converts from milli-seconds format into ACE_Time_Value format. More...
 
void msec (int)
 Converts from milli-seconds format into ACE_Time_Value format. More...
 
 operator timespec_t () const
 Returns the value of the object as a timespec_t. More...
 
 operator timeval () const
 Returns the value of the object as a timeval. More...
 
 operator const timeval * () const
 Returns a pointer to the object as a timeval. More...
 
 operator FILETIME () const
 Returns the value of the object as a Win32 FILETIME. More...
 
time_t sec (void) const
 Get seconds. More...
 
void sec (time_t sec)
 Set seconds. More...
 
suseconds_t usec (void) const
 Get microseconds. More...
 
void usec (suseconds_t usec)
 Set microseconds. More...
 
void to_usec (ACE_UINT64 &usec) const
 
ACE_Time_Valueoperator+= (const ACE_Time_Value &tv)
 Add tv to this. More...
 
ACE_Time_Valueoperator+= (time_t tv)
 Add tv to this. More...
 
ACE_Time_Valueoperator= (const ACE_Time_Value &tv)
 Assign tv to this. More...
 
ACE_Time_Valueoperator= (time_t tv)
 Assign tv to this. More...
 
ACE_Time_Valueoperator-= (const ACE_Time_Value &tv)
 Subtract tv to this. More...
 
ACE_Time_Valueoperator-= (time_t tv)
 Subtract tv to this. More...
 
ACE_Time_Valueoperator*= (double d)
 Multiply the time value by the d factor. More...
 
ACE_Time_Value operator++ (int)
 Increment microseconds as postfix. More...
 
ACE_Time_Valueoperator++ (void)
 Increment microseconds as prefix. More...
 
ACE_Time_Value operator-- (int)
 Decrement microseconds as postfix. More...
 
ACE_Time_Valueoperator-- (void)
 Decrement microseconds as prefix. More...
 
void dump (void) const
 Dump is a no-op. More...
 

Private Attributes

TIME_POLICY time_policy_
 

Additional Inherited Members

- Static Public Attributes inherited from ACE_Time_Value
static const ACE_Time_Value zero
 Constant "0". More...
 
static const ACE_Time_Value max_time
 
static const DWORDLONG FILETIME_to_timval_skew
 Const time difference between FILETIME and POSIX time. More...
 

Member Typedef Documentation

template<class TIME_POLICY >
typedef TIME_POLICY ACE_Time_Value_T< TIME_POLICY >::time_policy_t

Constructor & Destructor Documentation

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY >::ACE_Time_Value_T ( void  )
inline

Default Constructor.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY >::ACE_Time_Value_T ( time_t  sec,
suseconds_t  usec = 0 
)
inlineexplicit

Constructor.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY >::ACE_Time_Value_T ( const struct timeval &  t)
inlineexplicit

Construct the ACE_Time_Value from a timeval.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY >::ACE_Time_Value_T ( const timespec_t t)
inlineexplicit

Construct the ACE_Time_Value object from a timespec_t.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY >::ACE_Time_Value_T ( const ACE_Time_Value_T< TIME_POLICY > &  tv)
inline

Construct from ACE_Time_Value_T<TIME_POLICY>

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY >::ACE_Time_Value_T ( const ACE_Time_Value tv,
const TIME_POLICY &  tp = TIME_POLICY () 
)
inlineexplicit

Construct from ACE_Time_Value.

template<class TIME_POLICY >
virtual ACE_Time_Value_T< TIME_POLICY >::~ACE_Time_Value_T ( )
inlinevirtual

Destructor.

Member Function Documentation

template<class TIME_POLICY >
ACE_Time_Value * ACE_Time_Value_T< TIME_POLICY >::duplicate ( void  ) const
virtual

Duplicates this time value (incl. time policy).

Returns
Dynamically allocated time value copy.
Note
The caller is responsible for freeing the copy when it's not needed anymore.

Reimplemented from ACE_Time_Value.

template<class TIME_POLICY >
ACE_Time_Value ACE_Time_Value_T< TIME_POLICY >::now ( ) const
virtual

Get current time of day according to time policy.

Returns
Time value representing current time of day according to time policy.

Reimplemented from ACE_Time_Value.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > & ACE_Time_Value_T< TIME_POLICY >::operator*= ( double  d)

Multiply the time value by the d factor.

Note
The result of the operator is valid for results from range < (ACE_INT32_MIN, -999999), (ACE_INT32_MAX, 999999) >. Result outside this range are saturated to a limit.
template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > ACE_Time_Value_T< TIME_POLICY >::operator++ ( int  )

Increment microseconds as postfix.

Note
The only reason this is here is to allow the use of ACE_Atomic_Op with ACE_Time_Value.
template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > & ACE_Time_Value_T< TIME_POLICY >::operator++ ( void  )

Increment microseconds as prefix.

Note
The only reason this is here is to allow the use of ACE_Atomic_Op with ACE_Time_Value.
template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > & ACE_Time_Value_T< TIME_POLICY >::operator+= ( const ACE_Time_Value tv)

Add tv to this.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > & ACE_Time_Value_T< TIME_POLICY >::operator+= ( time_t  tv)

Add tv to this.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > ACE_Time_Value_T< TIME_POLICY >::operator-- ( int  )

Decrement microseconds as postfix.

Note
The only reason this is here is to allow the use of ACE_Atomic_Op with ACE_Time_Value.
template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > & ACE_Time_Value_T< TIME_POLICY >::operator-- ( void  )

Decrement microseconds as prefix.

Note
The only reason this is here is to allow the use of ACE_Atomic_Op with ACE_Time_Value.
template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > & ACE_Time_Value_T< TIME_POLICY >::operator-= ( const ACE_Time_Value tv)

Subtract tv to this.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > & ACE_Time_Value_T< TIME_POLICY >::operator-= ( time_t  tv)

Subtract tv to this.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > & ACE_Time_Value_T< TIME_POLICY >::operator= ( const ACE_Time_Value_T< TIME_POLICY > &  tv)

Assign @ tv to this.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > & ACE_Time_Value_T< TIME_POLICY >::operator= ( const ACE_Time_Value tv)

Assign @ tv to this.

template<class TIME_POLICY >
ACE_Time_Value_T< TIME_POLICY > & ACE_Time_Value_T< TIME_POLICY >::operator= ( time_t  tv)

Assign @ tv to this.

template<class TIME_POLICY >
ACE_Time_Value ACE_Time_Value_T< TIME_POLICY >::to_absolute_time ( ) const
virtual

Converts relative time value to absolute time value based on current time of day.

Returns
Absolute time value.
Note
This method uses it's time_policy_ member to get the current time of day. The developer is responsible for making sure this is a relative time value. Note that the returned time value has no notion of the time policy on which it is based anymore.

Reimplemented from ACE_Time_Value.

template<class TIME_POLICY >
ACE_Time_Value ACE_Time_Value_T< TIME_POLICY >::to_relative_time ( ) const
virtual

Converts absolute time value to time value relative to current time of day.

Returns
Relative time value.
Note
This method uses it's time_policy_ member to get the current time of day. The developer is responsible for making sure this is an absolute time value compatible with the active time policy. Note that the returned time value has no notion of the time policy on which it is based anymore.

Reimplemented from ACE_Time_Value.

Member Data Documentation

template<class TIME_POLICY >
TIME_POLICY ACE_Time_Value_T< TIME_POLICY >::time_policy_
private

The documentation for this class was generated from the following files: