Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Bug_2935_Regression / sink_i.cpp
blob8e2f53db3f53f15ad9d89d46ae3c3ebb781a992c
1 #include "sink_i.h"
2 #include "ace/OS_NS_unistd.h"
4 // Constructor
5 Sink_i::Sink_i (CORBA::ORB_ptr orb)
6 : orb_(CORBA::ORB::_duplicate(orb))
7 , tickCount_(0)
8 , tockCount_(0)
12 // Destructor
13 Sink_i::~Sink_i ()
17 bool
18 Sink_i::parse_args(int &, ACE_TCHAR *[])
20 return true;
23 // Implement the tick method
25 void
26 Sink_i::tick ()
28 ACE_OS::sleep(1);
29 tickCount_ += 1;
30 ACE_DEBUG((LM_DEBUG, "Sink (%P|%t) tick: %d\n", tickCount_));
33 void
34 Sink_i::tock ()
36 ACE_OS::sleep(1);
37 tockCount_ += 1;
38 ACE_DEBUG((LM_DEBUG, "Sink (%P|%t) tock: %d\n", tockCount_));
41 ::CORBA::ULong
42 Sink_i::tickCount ()
44 ACE_DEBUG((LM_DEBUG, "Sink (%P|%t) tickCount: %d\n", tickCount_));
45 return tickCount_;
48 ::CORBA::ULong
49 Sink_i::tockCount ()
51 ACE_DEBUG((LM_DEBUG, "Sink (%P|%t) tockCount: %d\n", tockCount_));
52 return tockCount_;
55 // Shutdown.
57 void
58 Sink_i::shutdown ()
60 ACE_DEBUG ((LM_DEBUG,
61 "Sink (%P|%t) shutting down. Ticks: %d Tocks %d\n",
62 (int)tickCount_,
63 (int)tockCount_));
65 // Instruct the ORB to shutdown.
66 this->orb_->shutdown ();