From 3b6f5b2e4d260c917235c9ee33be9eab300e7ce7 Mon Sep 17 00:00:00 2001 From: Nikhil Marathe Date: Tue, 15 May 2018 11:21:13 +0530 Subject: [PATCH] Add seconds to thread run times on MacOS. Fixes #1258 --- psutil/_psutil_osx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/psutil/_psutil_osx.c b/psutil/_psutil_osx.c index 55dd64ca5..ee55f169b 100644 --- a/psutil/_psutil_osx.c +++ b/psutil/_psutil_osx.c @@ -1069,8 +1069,8 @@ 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;