Skip to content

Commit

Permalink
fix: Make flaky timer tests work
Browse files Browse the repository at this point in the history
Signed-off-by: Janosch Machowinski <j.machowinski@nospam.org>
  • Loading branch information
Janosch Machowinski committed Mar 29, 2024
1 parent 3c6c5dc commit 700b252
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit 700b252

Please sign in to comment.