diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-08 22:07:49 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-08 22:07:49 +0000 |
commit | f9165af824b8b17874d968f3e57fad576570eb37 (patch) | |
tree | 923fca319913deedf33f4f1b95dc25736f288493 /ace/Time_Value.h | |
parent | ce166cd8c8fff5eb5a7ba8ea3bbeb7cf5a788979 (diff) | |
download | ATCD-f9165af824b8b17874d968f3e57fad576570eb37.tar.gz |
foo
Diffstat (limited to 'ace/Time_Value.h')
-rw-r--r-- | ace/Time_Value.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/ace/Time_Value.h b/ace/Time_Value.h index ec2d5aebabf..823d87d94c5 100644 --- a/ace/Time_Value.h +++ b/ace/Time_Value.h @@ -1,7 +1,6 @@ /* -*- C++ -*- */ // $Id$ - // ============================================================================ // // = LIBRARY @@ -248,6 +247,40 @@ private: // Microseconds. }; +class ACE_Export ACE_Countdown_Time + // = TITLE + // Keeps track of the amount of elapsed time. + // + // = DESCRIPTION + // This class has a side-effect on the <max_wait_time> -- every + // time the <stop> method is called the <max_wait_time> is + // updated. +{ +public: + // = Initialization and termination 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 start value. + + int stop (void); + // Compute the elapsed time. + +private: + ACE_Time_Value *max_wait_time_; + // Maximum time we were willing to wait. + + ACE_Time_Value start_time_; + // Beginning of the start time. + + int stopped_; + // Keeps track of whether we've already been stopped. +}; + #if defined (__ACE_INLINE__) #include "ace/Time_Value.i" #endif /* __ACE_INLINE__ */ |