Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / AMI_Timeouts / timeout_i.h
blobde8803326e05735dd0e80105a91d387011b5e16d
2 //=============================================================================
3 /**
4 * @file timeout_i.h
6 * Implements the CORBA object.
8 * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
9 */
10 //=============================================================================
13 #ifndef TIMEOUT_I_H
14 #define TIMEOUT_I_H
16 #include "ace/High_Res_Timer.h"
18 #include "timeoutS.h"
20 class Timeout_i
21 : public POA_TimeoutObj
23 public:
24 Timeout_i (CORBA::ORB_ptr orb);
26 ~Timeout_i ();
28 virtual void sendTimeToWait (CORBA::Long msec);
30 virtual void shutdown (void);
32 private:
34 CORBA::ORB_var orb_;
37 class TimeoutHandler_i
38 : public POA_AMI_TimeoutObjHandler
40 public:
41 TimeoutHandler_i ();
43 ~TimeoutHandler_i ();
45 virtual void sendTimeToWait (void);
47 virtual void sendTimeToWait_excep (
48 ::Messaging::ExceptionHolder * excep_holder);
50 void reset_reply_counter ();
52 void reset_reply_excep_counter ();
54 unsigned short reply_counter ();
56 unsigned short reply_excep_counter ();
58 /// Start the time measurement
59 void start ();
61 /// Return the elapsed time
62 ACE_Time_Value &elapsed_time ();
64 private:
65 unsigned short reply_counter_;
67 unsigned short reply_excep_counter_;
69 ACE_High_Res_Timer timer_;
71 ACE_Time_Value elapsed_time_;
74 #endif /* TIMEOUT_I_H */