Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comparing 2 high resolution points in time when more than a second has elapsed #17

Merged
merged 2 commits into from
Feb 9, 2025

Conversation

Baptouuuu
Copy link
Member

Problem

A condition is missing when comparing if a HighResolution is ahead of an other. If the start point second is below the other one then it will return it's ahead if the number of nanoseconds is higher.

Fix

If the start second is below the other always return false as there is no need to check the nanoseconds.

@Baptouuuu Baptouuuu added the bug label Feb 9, 2025
@Baptouuuu Baptouuuu self-assigned this Feb 9, 2025
Copy link

codecov bot commented Feb 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.80%. Comparing base (e1e48e1) to head (4dab6e5).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #17   +/-   ##
==========================================
  Coverage      99.80%   99.80%           
- Complexity       748      749    +1     
==========================================
  Files             56       57    +1     
  Lines           2530     2561   +31     
==========================================
+ Hits            2525     2556   +31     
  Misses             5        5           

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

@Baptouuuu Baptouuuu merged commit 6390bd7 into develop Feb 9, 2025
21 checks passed
@Baptouuuu Baptouuuu deleted the fix-high-precision-ahead-of branch February 9, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant