cvc4-1.4
clock_gettime.h
Go to the documentation of this file.
1/********************* */
17#include "cvc4_public.h"
18
19#ifndef __CVC4__LIB__CLOCK_GETTIME_H
20#define __CVC4__LIB__CLOCK_GETTIME_H
21
22#include "lib/replacements.h"
23
24#ifdef HAVE_CLOCK_GETTIME
25
26/* it should be available from <time.h> */
27#include <time.h>
28
29#else /* HAVE_CLOCK_GETTIME */
30
31/* otherwise, we have to define it */
32
33#if defined(__WIN32__) && !defined(_W64)
34
35#ifdef __cplusplus
36extern "C" {
37#endif /* __cplusplus */
38
39struct timespec {
40 uint64_t tv_sec;
41 int32_t tv_nsec;
42};/* struct timespec */
43
44#ifdef __cplusplus
45}/* extern "C" */
46#endif /* __cplusplus */
47
48#else /* !__WIN32__ || _W64 */
49
50/* get timespec from <time.h> */
51#include <time.h>
52
53#endif /* __WIN32__ && !_W64 */
54
55#ifdef __cplusplus
56extern "C" {
57#endif /* __cplusplus */
58
59struct timespec;
60
67
68long clock_gettime(clockid_t which_clock, struct timespec* tp);
69
70#ifdef __cplusplus
71}/* extern "C" */
72#endif /* __cplusplus */
73
74#endif /* HAVE_CLOCK_GETTIME */
75#endif /*__CVC4__LIB__CLOCK_GETTIME_H */
clockid_t
@ CLOCK_MONOTONIC
@ CLOCK_REALTIME_HR
@ CLOCK_REALTIME
@ CLOCK_MONOTONIC_HR
long clock_gettime(clockid_t which_clock, struct timespec *tp)
Macros that should be defined everywhere during the building of the libraries and driver binary,...