Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / MT_Timeout / Sleep_Service.cpp
blobee7114f22ec322f0e6d7d8dd17b3048bd08b0782
1 #include "Sleep_Service.h"
2 #include "ace/OS_NS_unistd.h"
4 Sleep_Service::Sleep_Service (CORBA::ORB_ptr orb)
5 : orb_ (CORBA::ORB::_duplicate (orb))
9 void
10 Sleep_Service::go_to_sleep (CORBA::ULong microseconds)
12 CORBA::ULong secs = microseconds / 1000000;
13 CORBA::ULong usecs = microseconds % 1000000;
14 ACE_Time_Value tv (secs, usecs);
16 ACE_OS::sleep (tv);
19 void
20 Sleep_Service::shutdown ()
22 ACE_DEBUG ((LM_DEBUG, "Shutting down the ORB\n"));
23 this->orb_->shutdown (false);