summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-09-13 17:39:51 (GMT)
committerGuido van Rossum <guido@python.org>1995-09-13 17:39:51 (GMT)
commitbbc3410fa819ff3b0945d9cf9fcb92550b0b799a (patch)
tree969d2093180ba3e1b1602aa17ae5b58d80fb9a33 /Modules/posixmodule.c
parenta3127e8e1149f20e780cf703fef217ee499d5e75 (diff)
downloadcpython-bbc3410fa819ff3b0945d9cf9fcb92550b0b799a.zip
cpython-bbc3410fa819ff3b0945d9cf9fcb92550b0b799a.tar.gz
cpython-bbc3410fa819ff3b0945d9cf9fcb92550b0b799a.tar.bz2
added 5th return item, clock time, to posix.times()
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index ffddd09..faf3cb5 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -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 */