blob: 10d28730a29b38770e866c28b364a4605a350aca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
// -*- C++ -*-
//
// $Id$
#include "ace/OS_NS_sys_time.h"
#include "ace/High_Res_Timer.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE ACE_Time_Value
ACE_Default_Time_Policy::operator()() const
{
return ACE_OS::gettimeofday();
}
ACE_INLINE ACE_Time_Value
ACE_HR_Time_Policy::operator()() const
{
return ACE_High_Res_Timer::gettimeofday_hr ();
}
ACE_INLINE
ACE_FPointer_Time_Policy::ACE_FPointer_Time_Policy()
: function_(ACE_OS::gettimeofday)
{
}
ACE_INLINE
ACE_FPointer_Time_Policy::
ACE_FPointer_Time_Policy(ACE_FPointer_Time_Policy::FPtr f)
: function_(f)
{
}
ACE_INLINE ACE_Time_Value
ACE_FPointer_Time_Policy::operator()() const
{
return (*this->function_)();
}
ACE_INLINE ACE_Time_Value
ACE_Dynamic_Time_Policy_Base::operator()() const
{
return this->gettimeofday ();
}
ACE_INLINE
ACE_Delegating_Time_Policy::ACE_Delegating_Time_Policy (ACE_Dynamic_Time_Policy_Base const * delegate)
: delegate_ (delegate != 0 ? delegate : &null_policy_)
{
}
ACE_INLINE ACE_Time_Value
ACE_Delegating_Time_Policy::operator()() const
{
return (*this->delegate_) ();
}
ACE_INLINE void
ACE_Delegating_Time_Policy::set_delegate (ACE_Dynamic_Time_Policy_Base const * delegate)
{
if (delegate != 0)
{
this->delegate_ = delegate;
}
}
ACE_INLINE ACE_Delegating_Time_Policy&
ACE_Delegating_Time_Policy::operator =(ACE_Delegating_Time_Policy const & pol)
{
this->delegate_ = pol.delegate_;
return *this;
}
ACE_END_VERSIONED_NAMESPACE_DECL
|