1 #ifndef ACE_MONOTONIC_TIME_POLICY_H
2 #define ACE_MONOTONIC_TIME_POLICY_H
5 * @file Monotonic_Time_Policy.h
7 * @author Martin Corino <mcorino@remedy.nl>
9 #include /**/ "ace/pre.h"
11 #include /**/ "ace/config-all.h"
13 #include /**/ "ace/Time_Value_T.h"
15 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 #endif /* ACE_LACKS_PRAGMA_ONCE */
19 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
22 * @class ACE_Monotonic_Time_Policy
24 * @brief Implement a monotonic time policy for ACE.
26 * This class implements support for returning monotonic time values
27 * on platforms that support that.
28 * If a platform does not support monotonic time ACE_HAS_MONOTONIC_TIME_POLICY
29 * isn't defined and the policy returns ACE_Time_Value::zero.
31 class ACE_Export ACE_Monotonic_Time_Policy
34 /// Return the current time according to this policy
35 ACE_Time_Value_T
<ACE_Monotonic_Time_Policy
> operator() () const;
37 /// Noop. Just here to satisfy backwards compatibility demands.
38 void set_gettimeofday (ACE_Time_Value (*gettimeofday
)(void));
41 ACE_END_VERSIONED_NAMESPACE_DECL
43 #if defined (__ACE_INLINE__)
44 #include "ace/Monotonic_Time_Policy.inl"
45 #endif /* __ACE_INLINE__ */
47 #include /**/ "ace/post.h"
48 #endif /* ACE_MONOTONIC_TIME_POLICY_H */