aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/abi-default/time_types.h
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2023-08-08 11:02:27 +0300
committerGitHub <noreply@github.com>2023-08-08 11:02:27 +0300
commitde97121a2e3afa072f7c51a0570f4b3bed0236c2 (patch)
tree1f34d2767951f54d11f0b9c8d48b0db04490d2c1 /include/odp/api/abi-default/time_types.h
parent2b359fc1759726826cf4e2afddbd0b7e39fab4c7 (diff)
parent1200684b94bf18ae98ba63fb49e9cda546b4832a (diff)
Merge ODP v1.41.1.0v1.41.1.0_DPDK_22.11
Merge ODP linux-generic v1.41.1.0 into linux-dpdk.
Diffstat (limited to 'include/odp/api/abi-default/time_types.h')
-rw-r--r--include/odp/api/abi-default/time_types.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/odp/api/abi-default/time_types.h b/include/odp/api/abi-default/time_types.h
new file mode 100644
index 000000000..4b7ec47eb
--- /dev/null
+++ b/include/odp/api/abi-default/time_types.h
@@ -0,0 +1,49 @@
+/* Copyright (c) 2015-2018, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_TIME_TYPES_H_
+#define ODP_ABI_TIME_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+/** @ingroup odp_time
+ * @{
+ **/
+
+/**
+ * @internal Time structure used for both POSIX timespec and HW counter
+ * implementations.
+ */
+typedef struct odp_time_t {
+ /** @internal Variant mappings for time type */
+ union {
+ /** @internal Used with generic 64 bit operations */
+ uint64_t u64;
+
+ /** @internal Nanoseconds */
+ uint64_t nsec;
+
+ /** @internal HW timer counter value */
+ uint64_t count;
+
+ };
+} odp_time_t;
+
+#define ODP_TIME_NULL ((odp_time_t){.u64 = 0})
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif