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

Returning ticks in CpuTime #76

Closed
eminence opened this issue May 21, 2020 · 2 comments · Fixed by #106
Closed

Returning ticks in CpuTime #76

eminence opened this issue May 21, 2020 · 2 comments · Fixed by #106
Assignees
Milestone

Comments

@eminence
Copy link
Owner

Hello,
The time returned in procfs::CpuTime should be a number of ticks in u64 as it is for processes in procfs::process::Stat. It's better to be able to get the values as returned by the kernel.

Originally posted by @lparcq in #69 (comment)

@eminence
Copy link
Owner Author

I think this is a good idea, and wanted to open a dedicated to discuss it.

I do think that being able to get the time in seconds is useful. Maybe we could also provide some methods that would do the tick-to-second conversion

@lparcq
Copy link

lparcq commented May 22, 2020

Yes it would be convenient to provide a helper function to convert in seconds. However I would prefer a number of milliseconds as u64 than a floating number of seconds.

@eminence eminence added this to the v0.9.0 milestone Jul 12, 2020
@eminence eminence self-assigned this Oct 24, 2020
eminence added a commit that referenced this issue Oct 24, 2020
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 a pull request may close this issue.

2 participants