diff options
Diffstat (limited to 'TAO/tests/MT_Timeout/Sleep_Service.cpp')
-rw-r--r-- | TAO/tests/MT_Timeout/Sleep_Service.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/TAO/tests/MT_Timeout/Sleep_Service.cpp b/TAO/tests/MT_Timeout/Sleep_Service.cpp new file mode 100644 index 00000000000..d94f8b98faa --- /dev/null +++ b/TAO/tests/MT_Timeout/Sleep_Service.cpp @@ -0,0 +1,30 @@ +// +// $Id$ +// +#include "Sleep_Service.h" + +ACE_RCSID(MT_Timeout, Sleep_Service, "$Id$") + +Sleep_Service::Sleep_Service (CORBA::ORB_ptr orb) + : orb_ (CORBA::ORB::_duplicate (orb)) +{ +} + +void +Sleep_Service::go_to_sleep (CORBA::ULong microseconds, + CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + CORBA::ULong secs = microseconds / 1000000; + CORBA::ULong usecs = microseconds % 1000000; + ACE_Time_Value tv (secs, usecs); + + ACE_OS::sleep (tv); +} + +void +Sleep_Service::shutdown (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + this->orb_->shutdown (0, ACE_TRY_ENV); +} |