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

hoist out timebase_to_ns in process interval calculation to fix CPU usage calculation #961

Merged
merged 2 commits into from Mar 24, 2023

Conversation

ClementTsang
Copy link
Contributor

@ClementTsang ClementTsang commented Mar 24, 2023

Seems to be one way to fix the issue highlighted in #956 due to timebase_to_ns differing between ARM and x86. From my experience, this has effectively no effect on x86 since timebase_to_ns is normally just 1 on that platform.

Tested on my M1 Macbook Pro and an x86 macOS emulator to both be close to htop when used to compile process-viewer.

@GuillaumeGomez
Copy link
Owner

Thanks a lot for this fix! I'll make a new release soon.

@GuillaumeGomez GuillaumeGomez merged commit 209aaed into GuillaumeGomez:master Mar 24, 2023
62 of 68 checks passed
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.

None yet

2 participants