-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
SystemClock time vs. ProcessCPUClock's real time #1
Comments
I think there is no too much difference between wall clock and process real clock sementically. The only difference lies in the implementation details, where different system APIs are used for the respective clocks. See https://docs.rs/howlong/0.1.5/howlong/clock/index.html#implementations-2 for more details. For the purpose of using this crate, I think you should use
It is important to note that
I would accept a PR for this. |
To check my understanding, would it be correct to phrase this as
are semantically identical in that all three mean to provide real, "wall clock" time, but that this is implementation-dependent by operating system (as shown in the table of the underlying APIs)? |
|
Thank you for this library!
A thing that confuses me is the difference between
and
Colloquially, "real" time is "wall clock" time, which seems to correspond to
SystemClock
(which is aliased byHighResolutionClock
) per this crate's docs and in the parlance of the Boost library's docs with theirsystem_clock
.But "CPU time" is colloquially "process user (out-of-kernel) time + process system (in-kernel) time", which would seem to correspond to:
But then what's
elapsed_cpu_time.real
? Boost docs corroborate this terminology ("timing information is broken down into real (wall clock) time, CPU time spent by the user, and CPU time spent by the operating system servicing user requests.") but don't seem to explain what the difference is between theirprocess_real_cpu_clock
andsystem_clock
.Some clarification in the docs would be great!
The text was updated successfully, but these errors were encountered: