BLPAPI C++ 3.26.6
Loading...
Searching...
No Matches
blpapi_timepoint.h
Go to the documentation of this file.
1/* Copyright 2012. Bloomberg Finance L.P.
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to
5 * deal in the Software without restriction, including without limitation the
6 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 * sell copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions: The above
9 * copyright notice and this permission notice shall be included in all copies
10 * or substantial portions of the Software.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
18 * IN THE SOFTWARE.
19 */
20
37
38#ifndef INCLUDED_BLPAPI_TIMEPOINT
39#define INCLUDED_BLPAPI_TIMEPOINT
76
77#ifndef INCLUDED_BLPAPI_CALL
78#include <blpapi_call.h>
79#endif
80
81#ifndef INCLUDED_BLPAPI_DEFS
82#include <blpapi_defs.h>
83#endif
84
85#ifndef INCLUDED_BLPAPI_TYPES
86#include <blpapi_types.h>
87#endif
88
96
111struct blpapi_TimePoint {
112
113 blpapi_Int64_t d_value;
114};
115
117typedef struct blpapi_TimePoint blpapi_TimePoint_t;
119
120#ifdef __cplusplus
121extern "C" {
122#endif
123
125
137BLPAPI_EXPORT
138long long blpapi_TimePointUtil_nanosecondsBetween(
139 const blpapi_TimePoint_t *start, const blpapi_TimePoint_t *end);
141
144
145#ifdef __cplusplus
146}
147
148namespace BloombergLP {
149namespace blpapi {
156
157// ================
158// struct TimePoint
159// ================
160
162typedef blpapi_TimePoint_t TimePoint;
163
171
172 static long long nanosecondsBetween(
173 const TimePoint& start, const TimePoint& end);
179};
180
183
184// ============================================================================
185// INLINE AND TEMPLATE FUNCTION IMPLEMENTATIONS
186// ============================================================================
187
188// --------------------
189// struct TimePointUtil
190// --------------------
191
193 const TimePoint& start, const TimePoint& end)
194{
195 return BLPAPI_CALL_TIMEPOINTUTIL_NANOSECONDSBETWEEN(&start, &end);
196}
197
198} // close namespace blpapi
199} // close namespace BloombergLP
200
201#endif // #ifdef __cplusplus
202#endif // #ifndef INCLUDED_BLPAPI_TIMEPOINT
Provide functions for dispatchtbl.
Common definitions used by the library.
Provide BLPAPI types.
blpapi_TimePoint_t TimePoint
Time point type alias.
Definition blpapi_timepoint.h:162
Definition blpapi_abstractsession.h:452
Definition blpapi_abstractsession.h:451
Definition blpapi_timepoint.h:170
static long long nanosecondsBetween(const TimePoint &start, const TimePoint &end)
Definition blpapi_timepoint.h:192