diff options
Diffstat (limited to 'TAO/tests/MT_Timeout/Sleep_Service.cpp')
-rw-r--r-- | TAO/tests/MT_Timeout/Sleep_Service.cpp | 29 |
1 files changed, 29 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..4af378547bc --- /dev/null +++ b/TAO/tests/MT_Timeout/Sleep_Service.cpp @@ -0,0 +1,29 @@ +// +// $Id$ +// +#include "Sleep_Service.h" +#include "ace/OS_NS_unistd.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::ULong secs = microseconds / 1000000; + CORBA::ULong usecs = microseconds % 1000000; + ACE_Time_Value tv (secs, usecs); + + ACE_OS::sleep (tv); +} + +void +Sleep_Service::shutdown (void) +{ + ACE_DEBUG ((LM_DEBUG, "Shutting down the ORB\n")); + this->orb_->shutdown (0); +} |