eal/freebsd: ignore in-memory option
[dpdk.git] / lib / eal / freebsd / include / rte_os_shim.h
1 /* SPDX-License-Identifier: BSD-3-Clause */
2
3 #ifndef _RTE_OS_SHIM_
4 #define _RTE_OS_SHIM_
5
6 #include <time.h>
7
8 #include <rte_os.h>
9
10 /**
11  * @file
12  * @internal
13  * Provides semi-standard OS facilities by convenient names.
14  */
15
16 #ifndef TIME_UTC
17
18 #define TIME_UTC 1
19
20 static inline int
21 rte_timespec_get(struct timespec *now, int base)
22 {
23         if (base != TIME_UTC || clock_gettime(CLOCK_REALTIME, now) < 0)
24                 return 0;
25         return base;
26 }
27
28 #define timespec_get(ts, base) rte_timespec_get(ts, base)
29
30 #endif /* !defined TIME_UTC */
31
32 #endif /* _RTE_OS_SHIM_ */