Skip to content

Ensure correct sleep in 'rmw_wait' - #344

Merged
David-LP99 merged 1 commit into
rollingfrom
fix/correct_sleep
Oct 6, 2026
Merged

David-LP99 merged 1 commit into
rollingfrom
fix/correct_sleep

Conversation

@David-LP99

Copy link
Copy Markdown
Contributor

Description

Because of truncation and rounding issues, there are some edge cases where rmw_wait() can sleep for less time than the indicated.

Main changes

  • Round non-zero ended nanosecond times up to the next millisecond
  • Since uxr_millis() rounds the clock time down (e.g. 100.9 ms to 100 ms), one more loop iteration is often needed when now == deadline

Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
@mergify

mergify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.68%. Comparing base (c6529e7) to head (d55b81c).

Additional details and impacted files
@@             Coverage Diff             @@
##           rolling     #344      +/-   ##
===========================================
- Coverage    54.93%   54.68%   -0.26%     
===========================================
  Files          102      102              
  Lines         5918     5918              
  Branches       944      944              
===========================================
- Hits          3251     3236      -15     
- Misses        2330     2347      +17     
+ Partials       337      335       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@David-LP99

Copy link
Copy Markdown
Contributor Author

@mergify backport kilted jazzy humble

@mergify

mergify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

backport kilted jazzy humble

✅ Backports have been created

Details

@David-LP99
David-LP99 merged commit c3257d4 into rolling Oct 6, 2026
4 checks passed
@David-LP99
David-LP99 deleted the fix/correct_sleep branch October 6, 2026 08:38
David-LP99 added a commit that referenced this pull request Oct 6, 2026
Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
Co-authored-by: David Laseca Perez <davidlaseca@eprosima.com>
David-LP99 added a commit that referenced this pull request Oct 6, 2026
Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
Co-authored-by: David Laseca Perez <davidlaseca@eprosima.com>
David-LP99 added a commit that referenced this pull request Oct 6, 2026
Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
Co-authored-by: David Laseca Perez <davidlaseca@eprosima.com>
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

Successfully merging this pull request may close these issues.

2 participants