-
Notifications
You must be signed in to change notification settings - Fork 30k
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
hrtime regression #4751
Comments
I can reproduce this. |
It does not actually mean negative values, it looks to me that the values are just not normalized. |
89f056b#diff-6ff379484cbabad48301d485db111c08R198does: |
The simplified fast test would be: |
I also noticed this recently and was really confused. |
My bad. I'll write up a patch and additional test case for this ASAP. |
Fix a regression introduced in commit 89f056b ("node: improve performance of hrtime()") where the nanosecond field sometimes had a negative value when calculating the difference between two timestamps. Fixes: nodejs#4751
Fix a regression introduced in commit 89f056b ("node: improve performance of hrtime()") where the nanosecond field sometimes had a negative value when calculating the difference between two timestamps. Fixes: #4751 PR-URL: #4757 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Fix a regression introduced in commit 89f056b ("node: improve performance of hrtime()") where the nanosecond field sometimes had a negative value when calculating the difference between two timestamps. Fixes: nodejs#4751 PR-URL: nodejs#4757 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
I have the feeling 89f056b introduced a regression. The nanoseconds might return negative values if you compare the actual value with the one before. This does not occur in 5.3 or before.
Easy to reproduce with:
The text was updated successfully, but these errors were encountered: