Skip to content

Commit

Permalink
Replace rcl_timer_init with rcl_timer_init2 (#989)
Browse files Browse the repository at this point in the history
Fix: #988
  • Loading branch information
minggangw authored Aug 12, 2024
1 parent cd6749e commit 83f9ddc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rcl_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ NAN_METHOD(CreateTimer) {

THROW_ERROR_IF_NOT_EQUAL(
RCL_RET_OK,
rcl_timer_init(timer, clock, context, RCL_MS_TO_NS(period_ms), nullptr,
rcl_get_default_allocator()),
rcl_timer_init2(timer, clock, context, RCL_MS_TO_NS(period_ms), nullptr,
rcl_get_default_allocator(), /*autostart=*/true),
rcl_get_error_string().str);

auto js_obj = RclHandle::NewInstance(timer, clock_handle, [](void* ptr) {
Expand Down

0 comments on commit 83f9ddc

Please sign in to comment.