diff options
Diffstat (limited to 'dep/acelite/ace/Countdown_Time.h')
-rw-r--r-- | dep/acelite/ace/Countdown_Time.h | 59 |
1 files changed, 7 insertions, 52 deletions
diff --git a/dep/acelite/ace/Countdown_Time.h b/dep/acelite/ace/Countdown_Time.h index b9c9a467f62..b63228d606f 100644 --- a/dep/acelite/ace/Countdown_Time.h +++ b/dep/acelite/ace/Countdown_Time.h @@ -4,9 +4,10 @@ /** * @file Countdown_Time.h * - * $Id: Countdown_Time.h 85365 2009-05-18 08:27:42Z johnnyw $ + * $Id: Countdown_Time.h 95332 2011-12-15 11:09:41Z mcorino $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> + * @author Irfan Pyarali <irfan@cs.wustl.edu> */ //============================================================================= @@ -15,67 +16,21 @@ #include /**/ "ace/pre.h" -#include /**/ "ace/ACE_export.h" - #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Time_Value.h" -#include "ace/Copy_Disabled.h" +#include "ace/Countdown_Time_T.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL -/** - * @class ACE_Countdown_Time - * - * @brief Keeps track of the amount of elapsed time. - * - * This class has a side-effect on the @c max_wait_time -- every - * time the stop() method is called the @c max_wait_time is - * updated. - */ -class ACE_Export ACE_Countdown_Time : private ACE_Copy_Disabled -{ -public: - /// Cache the @a max_wait_time and call @c start(). - ACE_Countdown_Time (ACE_Time_Value *max_wait_time); - - /// Destructor, makes sure the max_wait_time that got passed as pointer - /// to the constructor is updated with the time elapsed. - ~ACE_Countdown_Time (void); - - /// Cache the current time and enter a start state. - void start (void); - - /// Subtract the elapsed time from max_wait_time_ and enter a stopped - /// state. - void stop (void); - - /// Calls stop and then start. max_wait_time_ is modified by the - /// call to stop. - void update (void); - - /// Returns true if we've already been stopped, else false. - bool stopped (void) const; - -private: - /// Maximum time we were willing to wait. - ACE_Time_Value *max_wait_time_; - - /// Beginning of the start time. - ACE_Time_Value start_time_; - - /// Keeps track of whether we've already been stopped. - bool stopped_; -}; +// The following typedef is here for ease of use and backward +// compatibility. +typedef ACE_Countdown_Time_T<ACE_Default_Time_Policy> + ACE_Countdown_Time; ACE_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" -#if defined (__ACE_INLINE__) -#include "ace/Countdown_Time.inl" -#endif /* __ACE_INLINE__ */ - #endif /* ACE_COUNTDOWN_TIME_H */ |