3 //=============================================================================
5 * @file ORB_Time_Policy.h
7 * @author Martin Corino <mcorino@remedy.nl>
9 //=============================================================================
11 #ifndef ORB_TIME_POLICY_H
12 #define ORB_TIME_POLICY_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "tao/TAO_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Versioned_Namespace.h"
23 #include "ace/Time_Policy.h"
24 #include "ace/Time_Policy_T.h"
25 #include "ace/Countdown_Time_T.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
32 * @class ORB_Time_Policy
34 * @brief Implement a time policy class which returns timer according
35 * to the active ORB time policy.
38 class TAO_Export ORB_Time_Policy
41 /// Return the current time according to this policy
42 ACE_Time_Value
operator() () const;
44 static void set_time_policy (ACE_Dynamic_Time_Policy_Base
const * pol
);
45 static void reset_time_policy ();
48 static ACE_Time_Policy_T
<ACE_Default_Time_Policy
> default_policy_
;
49 static ACE_Dynamic_Time_Policy_Base
const * active_policy_
;
52 // Declare a countdown timer type based on ORB time policy
53 typedef ACE_Countdown_Time_T
<ORB_Time_Policy
> ORB_Countdown_Time
;
56 TAO_END_VERSIONED_NAMESPACE_DECL
58 #if defined (__ACE_INLINE__)
59 # include "tao/ORB_Time_Policy.inl"
60 #endif /* ! __ACE_INLINE__ */
62 #include /**/ "ace/post.h"
64 #endif /* ORB_TIME_POLICY_H */