mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Add more links to reference docs, move comment
This commit is contained in:
1 parent
42635fbaaf
commit
5eaa6d8dff
1 file changed
+3
-1
@@ -76,8 +76,10 @@ fn get_cpu_times() -> CPUTimes {
|
|||||||
&mut kernel_time,
|
&mut kernel_time,
|
||||||
&mut user_time,
|
&mut user_time,
|
||||||
);
|
);
|
||||||
// Extract times as laid out here: https://support.microsoft.com/en-us/help/188768/info-working-with-the-filetime-structure
|
|
||||||
|
// GetProcessTimes will exit with non-zero if success as per: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683223(v=vs.85).aspx
|
||||||
if res != 0 {
|
if res != 0 {
|
||||||
|
// Extract times as laid out here: https://support.microsoft.com/en-us/help/188768/info-working-with-the-filetime-structure
|
||||||
let user: i64 = (((user_time.dwHighDateTime as i64) << 32) + user_time.dwLowDateTime as i64) / HUNDRED_NS_PER_MS;
|
let user: i64 = (((user_time.dwHighDateTime as i64) << 32) + user_time.dwLowDateTime as i64) / HUNDRED_NS_PER_MS;
|
||||||
let kernel: i64 = (((kernel_time.dwHighDateTime as i64) << 32) + kernel_time.dwLowDateTime as i64) / HUNDRED_NS_PER_MS;
|
let kernel: i64 = (((kernel_time.dwHighDateTime as i64) << 32) + kernel_time.dwLowDateTime as i64) / HUNDRED_NS_PER_MS;
|
||||||
(user, kernel)
|
(user, kernel)
|
||||||
|
|||||||
Reference in new issue
Block a user