summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-15 22:46:07 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-15 22:46:07 +0000
commit75f8ea96afb77f1f526c4256554ba54fa57d7d56 (patch)
treea1efbd9a9f0b2a5b1b5afbfd9e4d53aefb5018e8
parente9826ac859768920543197c2c7f6dfa7c1bd1a8d (diff)
downloadATCD-75f8ea96afb77f1f526c4256554ba54fa57d7d56.tar.gz
ChangeLogTag:Thu Jul 15 17:37:07 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r--ace/OS.cpp38
-rw-r--r--ace/OS.i38
2 files changed, 38 insertions, 38 deletions
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 3dd067fdc78..5c23c25439a 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -346,44 +346,6 @@ ACE_Time_Value::normalize (void)
}
}
-int
-ACE_Countdown_Time::start (void)
-{
- if (this->max_wait_time_ != 0)
- {
- this->start_time_ = ACE_OS::gettimeofday ();
- this->stopped_ = 0;
- }
- return 0;
-}
-
-int
-ACE_Countdown_Time::update (void)
-{
- return (this->stop () == 0) && this->start ();
-}
-
-int
-ACE_Countdown_Time::stop (void)
-{
- if (this->max_wait_time_ != 0 && this->stopped_ == 0)
- {
- ACE_Time_Value elapsed_time =
- ACE_OS::gettimeofday () - this->start_time_;
-
- if (*this->max_wait_time_ > elapsed_time)
- *this->max_wait_time_ -= elapsed_time;
- else
- {
- // Used all of timeout.
- *this->max_wait_time_ = ACE_Time_Value::zero;
- // errno = ETIME;
- }
- this->stopped_ = 1;
- }
- return 0;
-}
-
ACE_Countdown_Time::ACE_Countdown_Time (ACE_Time_Value *max_wait_time)
: max_wait_time_ (max_wait_time),
stopped_ (0)
diff --git a/ace/OS.i b/ace/OS.i
index 37c397fba89..8aa9d358472 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -11934,3 +11934,41 @@ ACE_OS_CString::wchar_rep (void)
{
return this->rep_;
}
+
+ACE_INLINE int
+ACE_Countdown_Time::start (void)
+{
+ if (this->max_wait_time_ != 0)
+ {
+ this->start_time_ = ACE_OS::gettimeofday ();
+ this->stopped_ = 0;
+ }
+ return 0;
+}
+
+ACE_INLINE int
+ACE_Countdown_Time::stop (void)
+{
+ if (this->max_wait_time_ != 0 && this->stopped_ == 0)
+ {
+ ACE_Time_Value elapsed_time =
+ ACE_OS::gettimeofday () - this->start_time_;
+
+ if (*this->max_wait_time_ > elapsed_time)
+ *this->max_wait_time_ -= elapsed_time;
+ else
+ {
+ // Used all of timeout.
+ *this->max_wait_time_ = ACE_Time_Value::zero;
+ // errno = ETIME;
+ }
+ this->stopped_ = 1;
+ }
+ return 0;
+}
+
+ACE_INLINE int
+ACE_Countdown_Time::update (void)
+{
+ return (this->stop () == 0) && this->start ();
+}