Fixed typos
[ACE_TAO.git] / ACE / ace / Time_Policy.inl
blob8ecea8224907829c2ec0c7da3e03ff9d394010e4
1 // -*- C++ -*-
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());
13 ACE_INLINE void
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 ());
24 ACE_INLINE void
25 ACE_HR_Time_Policy::set_gettimeofday (ACE_Time_Value (*)(void))
29 ACE_INLINE
30 ACE_FPointer_Time_Policy::ACE_FPointer_Time_Policy()
31   : function_(ACE_OS::gettimeofday)
35 ACE_INLINE
36 ACE_FPointer_Time_Policy::
37 ACE_FPointer_Time_Policy(ACE_FPointer_Time_Policy::FPtr f)
38   : function_(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);
48 ACE_INLINE void
49 ACE_FPointer_Time_Policy::set_gettimeofday (ACE_Time_Value (*f)(void))
51   this->function_ = f;
54 ACE_INLINE ACE_Time_Value_T<ACE_Delegating_Time_Policy>
55 ACE_Dynamic_Time_Policy_Base::operator()() const
57   return this->gettimeofday ();
60 ACE_INLINE void
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_) ();
71 ACE_INLINE void
72 ACE_Delegating_Time_Policy::set_gettimeofday (ACE_Time_Value (*)(void))
76 ACE_INLINE void
77 ACE_Delegating_Time_Policy::set_delegate (ACE_Dynamic_Time_Policy_Base const * delegate)
79   if (delegate != 0)
80     {
81       this->delegate_ = delegate;
82     }
85 ACE_END_VERSIONED_NAMESPACE_DECL