mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)
(cherry picked from commit 8bf5fef873
)
Co-authored-by: vrajivk <3413293+vrajivk@users.noreply.github.com>
This commit is contained in:
parent
1d4285a042
commit
91020fade6
2 changed files with 2 additions and 1 deletions
|
@ -0,0 +1 @@
|
||||||
|
Fix the rusage implementation of time.process_time() to correctly report the sum of the system and user CPU time.
|
|
@ -1208,7 +1208,7 @@ _PyTime_GetProcessTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
_PyTime_t total = utime + utime;
|
_PyTime_t total = utime + stime;
|
||||||
*tp = total;
|
*tp = total;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue