bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)
diff --git a/Misc/NEWS.d/next/Library/2019-08-27-03-53-26.bpo-36205.AfkGRl.rst b/Misc/NEWS.d/next/Library/2019-08-27-03-53-26.bpo-36205.AfkGRl.rst
new file mode 100644
index 0000000..50cda34
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-08-27-03-53-26.bpo-36205.AfkGRl.rst
@@ -0,0 +1 @@
+Fix the rusage implementation of time.process_time() to correctly report the sum of the system and user CPU time.
\ No newline at end of file
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index bdc93a2..5e0010c 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -1208,7 +1208,7 @@
return -1;
}
- _PyTime_t total = utime + utime;
+ _PyTime_t total = utime + stime;
*tp = total;
return 0;
}