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 // HPUX seems to require this cast
19 start
.msec (static_cast<long> (start_time
));
21 "server:\t%d took\t%dms\n",
23 (ACE_OS::gettimeofday () - start
).msec ()));
25 // Time required to process this request. <work> is time units in
27 ACE_Time_Value
work_time (0, work
* 1000);
29 ACE_OS::sleep (work_time
);
35 ACE_DEBUG ((LM_DEBUG
, "server: got flush request\n"));
39 test_i::shutdown (CORBA::Long start_time
)
41 ACE_Time_Value
start (0);
42 start
.msec (static_cast<long> (start_time
)); // HPUX seems to require this cast
43 ACE_DEBUG ((LM_DEBUG
, "server: Shutting down... (%dms)\n",
44 (ACE_OS::gettimeofday() - start
).msec ()));
45 this->orb_
->shutdown (0);