Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Countdown_Time Class Reference

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

#include <OS.h>

Collaboration diagram for ACE_Countdown_Time:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_Countdown_Time (ACE_Time_Value *max_wait_time)
 Cache the <max_wait_time> and call <start>.

 ~ACE_Countdown_Time (void)
 Call <stop>.

int start (void)
 Cache the current time and enter a start state.

int stop (void)
 Subtract the elapsed time from max_wait_time_ and enter a stopped state.

int update (void)
 Calls stop and then start. max_wait_time_ is modified by the call to stop.


Private Attributes

ACE_Time_Valuemax_wait_time_
ACE_Time_Value start_time_
 Beginning of the start time.

int 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_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 )
 

Call <stop>.


Member Function Documentation

ACE_INLINE int ACE_Countdown_Time::start ( void )
 

Cache the current time and enter a start state.

ACE_INLINE int ACE_Countdown_Time::stop ( void )
 

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

ACE_INLINE int ACE_Countdown_Time::update ( void )
 

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


Member Data Documentation

ACE_Time_Value * ACE_Countdown_Time::max_wait_time_ [private]
 

ACE_Time_Value ACE_Countdown_Time::start_time_ [private]
 

Beginning of the start time.

int ACE_Countdown_Time::stopped_ [private]
 

Keeps track of whether we've already been stopped.


The documentation for this class was generated from the following files:
Generated at Fri Oct 5 07:01:43 2001 for ACE by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000