aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/include/odp/api/plat/time_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linux-dpdk/include/odp/api/plat/time_types.h')
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/time_types.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/platform/linux-dpdk/include/odp/api/plat/time_types.h b/platform/linux-dpdk/include/odp/api/plat/time_types.h
index 6f6e44a4a..cd1e75d18 100644
--- a/platform/linux-dpdk/include/odp/api/plat/time_types.h
+++ b/platform/linux-dpdk/include/odp/api/plat/time_types.h
@@ -21,18 +21,12 @@ extern "C" {
* @internal Time structure used to isolate linux-generic implementation from
* the linux timespec structure, which is dependent on POSIX extension level.
*/
-typedef union {
- struct {
- uint64_t ticks; /**< @internal ticks */
- uint64_t pad;
- };
- struct {
- int64_t tv_sec; /**< @internal Seconds */
- int64_t tv_nsec; /**< @internal Nanoseconds */
- };
+typedef struct {
+ int64_t tv_sec; /**< @internal Seconds or DPDK ticks */
+ int64_t tv_nsec; /**< @internal Nanoseconds */
} odp_time_t;
-#define ODP_TIME_NULL ((odp_time_t){ {0} })
+#define ODP_TIME_NULL ((odp_time_t){0, 0})
#ifdef __cplusplus
}