Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reconsider signature of rcl_clock_get_now #273

Closed
dirk-thomas opened this issue Jul 24, 2018 · 1 comment
Closed

reconsider signature of rcl_clock_get_now #273

dirk-thomas opened this issue Jul 24, 2018 · 1 comment
Assignees

Comments

@dirk-thomas
Copy link
Member

Currently the function takes a rcl_time_point_t * but neither checks the clock_type nor set the clock_type:

rcl/rcl/src/rcl/time.c

Lines 228 to 240 in d3a734f

rcl_ret_t
rcl_clock_get_now(rcl_clock_t * clock, rcl_time_point_t * time_point)
{
RCL_CHECK_ARGUMENT_FOR_NULL(time_point, RCL_RET_INVALID_ARGUMENT, rcl_get_default_allocator());
if (clock->type && clock->get_now) {
return clock->get_now(clock->data,
&(time_point->nanoseconds));
}
RCL_SET_ERROR_MSG(
"clock is not initialized or does not have get_now registered.",
rcl_get_default_allocator());
return RCL_RET_ERROR;
}

Should the signature be changed to a rcl_time_point_value_t instead?

@dirk-thomas dirk-thomas added the in progress Actively being worked on (Kanban column) label Jul 24, 2018
@dirk-thomas dirk-thomas self-assigned this Jul 24, 2018
@dirk-thomas
Copy link
Member Author

See proposed changed (part of #272): 28e6ba1

@dirk-thomas dirk-thomas added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Jul 26, 2018
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant