]> granicus.if.org Git - python/commitdiff
#2063: correct order of utime and stime in os.times()
authorGeorg Brandl <georg@python.org>
Wed, 13 Feb 2008 07:20:22 +0000 (07:20 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 13 Feb 2008 07:20:22 +0000 (07:20 +0000)
result on Windows.

Doc/library/os.rst
Misc/NEWS
Modules/posixmodule.c

index ff37d10f1d58c501b5ec856e908761efa26cc62b..f76cd977cc11343861cdd80f13336a8988512e59 100644 (file)
@@ -1846,7 +1846,7 @@ written in Python, such as a mail server's external command delivery program.
    user time, children's system time, and elapsed real time since a fixed point in
    the past, in that order.  See the Unix manual page :manpage:`times(2)` or the
    corresponding Windows Platform API documentation. Availability: Macintosh, Unix,
-   Windows.
+   Windows.  On Windows, only the first two items are filled, the others are zero.
 
 
 .. function:: wait()
index d996f4884202b001f40d51f7f8a8c1e1df2443cf..5b334d8037785390f77434b9ccc5a6a50b1f00f9 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1132,6 +1132,8 @@ Library
 Extension Modules
 -----------------
 
+- #2063: correct order of utime and stime in os.times() result on Windows.
+
 - Patch #1736: Fix file name handling of _msi.FCICreate.
 
 - Updated ``big5hkscs`` codec to the HKSCS revision of 2004.
index 7c2cb12c43eda205d5d45388e8730766509643ea..fab44d6aa481b9e9870e9be1732411bc3af6ec89 100644 (file)
@@ -5987,10 +5987,10 @@ posix_times(PyObject *self, PyObject *noargs)
        */
        return Py_BuildValue(
                "ddddd",
-               (double)(kernel.dwHighDateTime*429.4967296 +
-                        kernel.dwLowDateTime*1e-7),
                (double)(user.dwHighDateTime*429.4967296 +
                         user.dwLowDateTime*1e-7),
+               (double)(kernel.dwHighDateTime*429.4967296 +
+                        kernel.dwLowDateTime*1e-7),
                (double)0,
                (double)0,
                (double)0);