Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions rcl/src/rcl/wait.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,6 @@ rcl_wait(rcl_wait_set_t * wait_set, int64_t timeout)
}
}

clocks[clock->type] = clock;

// get the time of the next call to the timer
int64_t next_call_time = INT64_MAX;
rcl_ret_t ret = rcl_timer_get_next_call_time(wait_set->timers[t_idx], &next_call_time);
Expand All @@ -609,6 +607,7 @@ rcl_wait(rcl_wait_set_t * wait_set, int64_t timeout)
return ret; // The rcl error state should already be set.
}
if (next_call_time < min_next_call_time[clock->type]) {
clocks[clock->type] = clock;
min_next_call_time[clock->type] = next_call_time;
}
}
Expand Down