ACE_Countdown_Time Class Reference

Keeps track of the amount of elapsed time. More...

#include <Countdown_Time.h>

Collaboration diagram for ACE_Countdown_Time:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ACE_Countdown_Time (ACE_Time_Value *max_wait_time)
 Cache the max_wait_time and call start().
 ~ACE_Countdown_Time (void)
void start (void)
 Cache the current time and enter a start state.
void stop (void)
void update (void)
bool stopped (void) const
 Returns true if we've already been stopped, else false.

Private Member Functions

 ACE_Countdown_Time (const ACE_Countdown_Time &)
ACE_Countdown_Timeoperator= (const ACE_Countdown_Time &)

Private Attributes

ACE_Time_Valuemax_wait_time_
 Maximum time we were willing to wait.
ACE_Time_Value start_time_
 Beginning of the start time.
bool stopped_
 Keeps track of whether we've already been stopped.


Detailed Description

Keeps track of the amount of elapsed time.

This class has a side-effect on the max_wait_time -- every time the stop() method is called the max_wait_time is updated.


Constructor & Destructor Documentation

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Countdown_Time::ACE_Countdown_Time ( ACE_Time_Value max_wait_time  ) 

Cache the max_wait_time and call start().

ACE_Countdown_Time::~ACE_Countdown_Time ( void   ) 

Destructor, makes sure the max_wait_time that got passed as pointer to the constructor is updated with the time elapsed.

ACE_Countdown_Time::ACE_Countdown_Time ( const ACE_Countdown_Time  )  [private]


Member Function Documentation

void ACE_Countdown_Time::start ( void   ) 

Cache the current time and enter a start state.

void ACE_Countdown_Time::stop ( void   ) 

Subtract the elapsed time from max_wait_time_ and enter a stopped state.

void ACE_Countdown_Time::update ( void   ) 

Calls stop and then start. max_wait_time_ is modified by the call to stop.

bool ACE_Countdown_Time::stopped ( void   )  const

Returns true if we've already been stopped, else false.

ACE_Countdown_Time& ACE_Countdown_Time::operator= ( const ACE_Countdown_Time  )  [private]


Member Data Documentation

Maximum time we were willing to wait.

Beginning of the start time.

Keeps track of whether we've already been stopped.


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

Generated on Wed Apr 23 02:38:45 2008 for ACE by  doxygen 1.5.5