Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Bug_2935_Regression / source_i.cpp
blobe70de79322a87d3a1ac73d4c63aa1fa8a935311b
1 #include "source_i.h"
3 Source_i::Source_i (ThreeTier_ptr target)
4 : target_(ThreeTier::_duplicate(target))
5 , counter_(5)//1000000)
9 Source_i::~Source_i ()
13 bool
14 Source_i::parse_args(int, ACE_TCHAR *[])
16 return true;
19 int
20 Source_i::run ()
22 try
24 for(size_t loop = 0; loop < counter_; ++loop)
26 // call a 'nop' method on the server
27 target_->tick();
28 // target_->tock();
29 // this sleep can be used give the middle tier a chance
30 // to catch up.
31 // ACE_OS::sleep(3);
33 unsigned long tickCount = target_->tickCount();
34 unsigned long tockCount = target_->tockCount();
36 ACE_DEBUG ((LM_DEBUG,
37 "Count of ticks: %d tocks: %d\n",
38 (int)tickCount, (int)tockCount));
40 target_->shutdown ();
42 catch (const CORBA::Exception& ex)
44 ex._tao_print_exception ("\tSOURCE: Exception");
45 return -1;
48 return 0;