Skip to content

reconsider signature of rcl_clock_get_now #273

Closed

Description

@dirk-thomas

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?

Activity

  1. added
    in progress
    on Jul 24, 2018
  2. self-assigned this
    on Jul 24, 2018
  3. dirk-thomas commented on Jul 24, 2018

    @dirk-thomas
    MemberAuthor

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

  4. added
    in review
    and removed
    in progress
    on Jul 26, 2018
  5. removed
    in review
    on Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions