2 #include "ace/OS_NS_sys_time.h"
3 #include "ace/High_Res_Timer.h"
5 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
7 ACE_INLINE ACE_Time_Value_T<ACE_System_Time_Policy>
8 ACE_System_Time_Policy::operator()() const
10 return ACE_Time_Value_T<ACE_System_Time_Policy> (ACE_OS::gettimeofday());
14 ACE_System_Time_Policy::set_gettimeofday (ACE_Time_Value (*)(void))
18 ACE_INLINE ACE_Time_Value_T<ACE_HR_Time_Policy>
19 ACE_HR_Time_Policy::operator()() const
21 return ACE_Time_Value_T<ACE_HR_Time_Policy> (ACE_High_Res_Timer::gettimeofday_hr ());
25 ACE_HR_Time_Policy::set_gettimeofday (ACE_Time_Value (*)(void))
30 ACE_FPointer_Time_Policy::ACE_FPointer_Time_Policy()
31 : function_(ACE_OS::gettimeofday)
36 ACE_FPointer_Time_Policy::
37 ACE_FPointer_Time_Policy(ACE_FPointer_Time_Policy::FPtr f)
42 ACE_INLINE ACE_Time_Value_T<ACE_FPointer_Time_Policy>
43 ACE_FPointer_Time_Policy::operator()() const
45 return ACE_Time_Value_T<ACE_FPointer_Time_Policy> ((*this->function_)(), *this);
49 ACE_FPointer_Time_Policy::set_gettimeofday (ACE_Time_Value (*f)(void))
54 ACE_INLINE ACE_Time_Value_T<ACE_Delegating_Time_Policy>
55 ACE_Dynamic_Time_Policy_Base::operator()() const
57 return this->gettimeofday ();
61 ACE_Dynamic_Time_Policy_Base::set_gettimeofday (ACE_Time_Value (*)(void))
65 ACE_INLINE ACE_Time_Value_T<ACE_Delegating_Time_Policy>
66 ACE_Delegating_Time_Policy::operator()() const
68 return (*this->delegate_) ();
72 ACE_Delegating_Time_Policy::set_gettimeofday (ACE_Time_Value (*)(void))
77 ACE_Delegating_Time_Policy::set_delegate (ACE_Dynamic_Time_Policy_Base const * delegate)
81 this->delegate_ = delegate;
85 ACE_END_VERSIONED_NAMESPACE_DECL