8000 bpo-36205: Fix the rusage implementation of time.process_time() (GH-1… · python/cpython@8bf5fef · GitHub
[go: up one dir, main page]

Skip to content

Commit 8bf5fef

Browse files
vrajivkned-deily
authored andcommitted
bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)
1 parent fae0ed5 commit 8bf5fef

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix the rusage implementation of time.process_time() to correctly report the sum of the system and user CPU time.

Modules/timemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ _PyTime_GetProcessTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
12081208
return -1;
12091209
}
12101210

1211-
_PyTime_t total = utime + utime;
1211+
_PyTime_t total = utime + stime;
12121212
*tp = total;
12131213
return 0;
12141214
}

0 commit comments

Comments
 (0)
0