EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GetTime.h
Go to the documentation of this file.
1 /*|-----------------------------------------------------------------------------
2 *| This source code is provided under the Apache 2.0 license --
3 *| and is provided AS IS with no warranty or guarantee of fit for purpose. --
4 *| See the project's LICENSE.md for details. --
5 *| Copyright (C) 2019 Refinitiv. All rights reserved. --
6 *|-----------------------------------------------------------------------------
7 */
8 
9 #ifndef __thomsonreuters_ema_access_GetTime_h
10 #define __thomsonreuters_ema_access_GetTime_h
11 
35 #include "Common.h"
36 
37 namespace thomsonreuters {
38 
39 namespace ema {
40 
41 namespace access {
42 
47 typedef UInt64 TimeValue;
48 
50 {
51 public :
52 
54 
55 
58  static TimeValue getSeconds();
59 
61 
64  static TimeValue getMillis();
65 
67 
70  static TimeValue getMicros();
71 
73 
76  static TimeValue getNanos();
77 
79 
82  static TimeValue getTicks();
83 
85 
88  static double ticksPerSecond();
89 
91 
94  static double ticksPerMilli();
95 
97 
100  static double ticksPerMicro();
101 
103 
106  static double ticksPerNano();
108 
109 private:
110 
111  static double _initTicksPerSecond();
112  static double _initTicksPerMilli();
113  static double _initTicksPerMicro();
114  static double _initTicksPerNano();
115 
116  static const double _TICKS_PER_SECOND;
117  static const double _TICKS_PER_MILLI;
118  static const double _TICKS_PER_MICRO;
119  static const double _TICKS_PER_NANO;
120 };
121 
122 }
123 
124 }
125 
126 }
127 
128 #endif // __thomsonreuters_ema_access_GetTime_h
129 
UInt64 TimeValue
represents TimeValue as a 64-bit unsigned integer
Definition: GetTime.h:47
unsigned long long UInt64
represents 64-bit unsigned integer
Definition: Common.h:68
GetTime class encapsulates functionality for efficiently obtaining relative time in various standard ...
Definition: GetTime.h:49
#define EMA_ACCESS_API
Definition: Common.h:95
Common.h file provides definitions of common variable types used in EMA.