Skip to content

Conversation

@alexapostolu
Copy link
Contributor

Use the macro NSEC_PER_SEC defined in sys_clock.h for nanoseconds per second when updating write stats.

Fixes: #62641

Issue #62641 was mostly implemented, but as a comment pointed out there were two files that still used the 1000000000U constant instead of the macro NSEC_PER_SEC, which is defined as ((NSEC_PER_USEC) * (USEC_PER_MSEC) * (MSEC_PER_SEC)).

@github-actions
Copy link

Hello @alexapostolu, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@jhedberg
Copy link
Member

@alexapostolu thanks for the PR! You still need to make the Compliance check pass before this can be merged, however. Seems like you have a too long line in the commit message.

Copy link
Contributor

@Thalley Thalley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, but please fix compliance :)

Use the macro NSEC_PER_SEC defined in sys_clock.h for nanoseconds per
second when updating write stats.

Signed-off-by: Alex Apostolu <apostolu240@gmail.com>
@alexapostolu
Copy link
Contributor Author

Fixed the commit message

@sonarqubecloud
Copy link

@kartben kartben merged commit 6e34acc into zephyrproject-rtos:main May 16, 2025
29 checks passed
@github-actions
Copy link

Hi @alexapostolu!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

@alexapostolu alexapostolu deleted the alex/nsec-macro branch May 30, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bluetooth: Use DIV_ROUND_UP and NSEC_PER_SEC or similar macro consistently

6 participants