opentracing-c
OpenTracing C API
common.h
Go to the documentation of this file.
1 #ifndef OPENTRACINGC_COMMON_H
2 #define OPENTRACINGC_COMMON_H
3 
4 #include <opentracing-c/config.h>
5 
6 #include <time.h>
7 
8 #ifdef HAVE_SYS_TIME_H
9 #include <sys/time.h>
10 #endif /* HAVE_SYS_TIME_H */
11 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif /* __cplusplus */
17 
19 typedef enum { opentracing_true = 1, opentracing_false = 0 } opentracing_bool;
20 
21 #ifdef OPENTRACINGC_USE_TIMESPEC
22 
23 typedef struct timespec opentracing_time_value;
24 
25 #else
26 
27 typedef struct opentracing_time_value {
28  time_t tv_sec;
29  long int tv_nsec;
31 
32 #endif /* OPENTRACINGC_USE_TIMESPEC */
33 
37 typedef struct opentracing_duration {
41 
43 typedef struct opentracing_timestamp {
47 
48 #ifdef __cplusplus
49 }
50 #endif /* __cplusplus */
51 
52 #endif /* OPENTRACINGC_COMMON_H */
Duration type to calculate precise intervals (should use monotonic clock).
Definition: common.h:37
opentracing_bool
Boolean type.
Definition: common.h:19
struct opentracing_timestamp opentracing_timestamp
Timestamp type to represent absolute time (should use system clock).
opentracing_time_value value
Timestamp value.
Definition: common.h:45
opentracing_time_value value
Duration value.
Definition: common.h:39
Definition: common.h:27
Timestamp type to represent absolute time (should use system clock).
Definition: common.h:43
struct opentracing_duration opentracing_duration
Duration type to calculate precise intervals (should use monotonic clock).