2 #include "ace/OS_NS_unistd.h"
3 #include "ace/OS_NS_sys_time.h"
4 #include "ace/Time_Value.h"
6 test_i::test_i (CORBA::ORB_ptr orb
)
7 : orb_ (CORBA::ORB::_duplicate (orb
))
12 test_i::method (CORBA::ULong request_number
,
13 CORBA::Long start_time
,
17 ACE_Time_Value
start (0);
18 start
.msec (static_cast<long> (start_time
));
20 "server:\t%d took\t%dms\n",
22 (ACE_OS::gettimeofday () - start
).msec ()));
24 // Time required to process this request. <work> is time units in
26 ACE_Time_Value
work_time (0, work
* 1000);
28 ACE_OS::sleep (work_time
);
34 ACE_DEBUG ((LM_DEBUG
, "server: got flush request\n"));
38 test_i::shutdown (CORBA::Long start_time
)
40 ACE_Time_Value
start (0);
41 start
.msec (static_cast<long> (start_time
));
42 ACE_DEBUG ((LM_DEBUG
, "server: Shutting down... (%dms)\n",
43 (ACE_OS::gettimeofday() - start
).msec ()));
44 this->orb_
->shutdown (false);