Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Bug_2935_Regression / source_i.cpp
blobdec6db49ea32d233ebe27e0ca56b97bce73f7769
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 ();
43 catch (const CORBA::Exception& ex)
45 ex._tao_print_exception ("\tSOURCE: Exception");
46 return -1;
49 return 0;