summaryrefslogtreecommitdiff
path: root/ACE/ace/Time_Value_T.cpp
blob: 79689d904c3af0b1d8d91b5e68875535b403ecec (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
#ifndef ACE_TIME_VALUE_T_CPP
#define ACE_TIME_VALUE_T_CPP

#include "ace/Time_Value_T.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#if !defined (__ACE_INLINE__)
#include "ace/Time_Value_T.inl"
#endif /* __ACE_INLINE__ */

#include "ace/OS_Memory.h"

ACE_BEGIN_VERSIONED_NAMESPACE_DECL

template <class TIME_POLICY>
ACE_Time_Value
ACE_Time_Value_T<TIME_POLICY>::now () const
{
  return this->time_policy_ ();
}

template <class TIME_POLICY>
ACE_Time_Value
ACE_Time_Value_T<TIME_POLICY>::to_relative_time () const
{
  return (*this) - this->time_policy_ ();
}

template <class TIME_POLICY>
ACE_Time_Value
ACE_Time_Value_T<TIME_POLICY>::to_absolute_time () const
{
  return (*this) + this->time_policy_ ();
}

template <class TIME_POLICY>
ACE_Time_Value *
ACE_Time_Value_T<TIME_POLICY>::duplicate () const
{
  ACE_Time_Value_T<TIME_POLICY> * tmp = 0;
  ACE_NEW_RETURN (tmp, ACE_Time_Value_T<TIME_POLICY> (*this), 0);
  return tmp;
}

ACE_END_VERSIONED_NAMESPACE_DECL

#endif /* ACE_TIME_VALUE_T_CPP */