OpenDDS  Snapshot(2023/04/28-20:55)
TimeTypes.h
Go to the documentation of this file.
1 /**
2  * \file
3  * See https://opendds.readthedocs.io/en/master/internal/dev_guidelines.html#time
4  * (or docs/internal/dev_guidelines.rst) for background and reasoning for these
5  * types.
6  */
7 
8 #ifndef OPENDDS_DCPS_TIMETYPES_H
9 #define OPENDDS_DCPS_TIMETYPES_H
10 
11 #include "TimeDuration.h"
12 #include "TimePoint_T.h"
13 
15 #include <ace/Time_Policy.h>
16 
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 
22 
23 namespace OpenDDS {
24 namespace DCPS {
25 
26 /**
27  * ACE_Time_Policy that OpenDDS uses to define the system clock for external
28  * interactions.
29  */
30 ///@{
33 ///@}
34 
35 /**
36  * ACE_Time_Policy that OpenDDS uses for internal timing.
37  *
38  * ACE_Monotonic_Time_Policy protects OpenDDS from being effected by changes to
39  * the system clock to a certain degree.
40  */
41 ///@{
42 #if defined(ACE_HAS_MONOTONIC_TIME_POLICY) && defined(ACE_HAS_MONOTONIC_CONDITIONS)
43 # define OPENDDS_USES_MONOTONIC_TIME
44 #endif
45 
46 #ifdef OPENDDS_USES_MONOTONIC_TIME
48 #else
49 typedef SystemClock MonotonicClock;
50 #endif
52 ///@}
53 
54 } // namespace DCPS
55 } // namespace OpenDDS
56 
58 
59 #endif
ACE_System_Time_Policy SystemClock
Definition: TimeTypes.h:31
TimePoint_T< SystemClock > SystemTimePoint
Definition: TimeTypes.h:32
SystemClock MonotonicClock
Definition: TimeTypes.h:49
TimePoint_T< MonotonicClock > MonotonicTimePoint
Definition: TimeTypes.h:51
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28