]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
added 5th return item, clock time, to posix.times()
authorGuido van Rossum <guido@python.org>
Wed, 13 Sep 1995 17:39:51 +0000 (17:39 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 13 Sep 1995 17:39:51 +0000 (17:39 +0000)
Modules/posixmodule.c

index ffddd09154a42a406dbcf09aa1682415e4d19a5e..faf3cb524a50544824ca8049ddbbc2279d09bdd9 100644 (file)
@@ -1079,11 +1079,12 @@ posix_times(self, args)
        c = times(&t);
        if (c == (clock_t) -1)
                return posix_error();
-       return mkvalue("dddd",
+       return mkvalue("ddddd",
                       (double)t.tms_utime / HZ,
                       (double)t.tms_stime / HZ,
                       (double)t.tms_cutime / HZ,
-                      (double)t.tms_cstime / HZ);
+                      (double)t.tms_cstime / HZ,
+                      (double)c / HZ);
 }
 #endif /* HAVE_TIMES */
 #if defined(NT) && !defined(HAVE_TIMES)
@@ -1099,10 +1100,11 @@ posix_times(self, args)
                return NULL;
        hProc = GetCurrentProcess();
        GetProcessTimes(hProc,&create, &exit, &kernel, &user);
-       return mkvalue("dddd",
+       return mkvalue("ddddd",
                       (double)(kernel.dwHighDateTime*2E32+kernel.dwLowDateTime) / 2E6,
                       (double)(user.dwHighDateTime*2E32+user.dwLowDateTime) / 2E6,
                       (double)0,
+                      (double)0,
                       (double)0);
 }
 #endif /* NT */