From d4c156491227b3beac02c5cf3051ae2807f689c9 Mon Sep 17 00:00:00 2001 From: Jackie Kay Date: Fri, 24 Jul 2015 16:50:36 -0700 Subject: [PATCH] add rmw_time_t, pass time to rmw_wait --- rmw/include/rmw/rmw.h | 2 +- rmw/include/rmw/types.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/rmw/include/rmw/rmw.h b/rmw/include/rmw/rmw.h index 1e9e1f3d2..62c3c0238 100644 --- a/rmw/include/rmw/rmw.h +++ b/rmw/include/rmw/rmw.h @@ -178,7 +178,7 @@ rmw_wait( rmw_guard_conditions_t * guard_conditions, rmw_services_t * services, rmw_clients_t * clients, - bool non_blocking); + rmw_time_t * wait_timeout); #if __cplusplus } diff --git a/rmw/include/rmw/types.h b/rmw/include/rmw/types.h index 48bca18ba..fb0df068f 100644 --- a/rmw/include/rmw/types.h +++ b/rmw/include/rmw/types.h @@ -28,6 +28,7 @@ extern "C" typedef int rmw_ret_t; #define RMW_RET_OK 0 #define RMW_RET_ERROR 1 +#define RMW_RET_TIMEOUT 2 typedef struct RMW_PUBLIC_TYPE rmw_node_t { @@ -95,6 +96,12 @@ typedef struct RMW_PUBLIC_TYPE rmw_request_id_t int64_t sequence_number; } rmw_request_id_t; +typedef struct RMW_PUBLIC_TYPE rmw_time_t +{ + uint64_t sec; + uint64_t nsec; +} rmw_time_t; + #if __cplusplus } #endif