Skip to content

Commit

Permalink
Merge pull request #25 from ros2/wait_timeout
Browse files Browse the repository at this point in the history
introduce time struct, add timeout duration to rmw_wait
  • Loading branch information
jacquelinekay committed Aug 5, 2015
2 parents e40d9d7 + d4c1564 commit d5bd0c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rmw/include/rmw/rmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
7 changes: 7 additions & 0 deletions rmw/include/rmw/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d5bd0c2

Please sign in to comment.