We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I believe ProcTime.Get is broken on M1 (and probably M2) Macs. It does
ProcTime.Get
self.User = uint64(info.ptinfo.pti_total_user) / uint64(time.Millisecond)
but, on Darwin, pti_total_user needs to be scaled up by a factor of 125/3 because it is not expressed in nanos, but in "mach ticks" (I believe these ticks used to be nanos on Intel Macs). See https://developer.apple.com/documentation/driverkit/3433733-mach_timebase_info.
pti_total_user
For reference, this is how htop does it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I believe
ProcTime.Get
is broken on M1 (and probably M2) Macs.It does
but, on Darwin,
pti_total_user
needs to be scaled up by a factor of 125/3 because it is not expressed in nanos, but in "mach ticks" (I believe these ticks used to be nanos on Intel Macs). See https://developer.apple.com/documentation/driverkit/3433733-mach_timebase_info.For reference, this is how htop does it.
The text was updated successfully, but these errors were encountered: