Skip to content

Commit

Permalink
Add seconds to thread run times on MacOS. (#1292)
Browse files Browse the repository at this point in the history
Add seconds to thread run times on MacOS (fix #1278)
  • Loading branch information
nikhilm authored and giampaolo committed Jun 15, 2018
1 parent db56931 commit 3612b85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions psutil/_psutil_osx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,10 @@ psutil_proc_threads(PyObject *self, PyObject *args) {
py_tuple = Py_BuildValue(
"Iff",
j + 1,
(float)basic_info_th->user_time.microseconds / 1000000.0,
(float)basic_info_th->system_time.microseconds / 1000000.0
basic_info_th->user_time.seconds + \
(float)basic_info_th->user_time.microseconds / 1000000.0,
basic_info_th->system_time.seconds + \
(float)basic_info_th->system_time.microseconds / 1000000.0
);
if (!py_tuple)
goto error;
Expand Down

0 comments on commit 3612b85

Please sign in to comment.