This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients brian.curtin, larry, loewis, pitrou, steve.dower, tim.golden, tim.peters
Date 2013-11-23.01:15:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385169352.32.0.642692439706.issue19727@psf.upfronthosting.co.za>
In-reply-to
Content
os.utime() uses the following code when times is None under Windows:

        SYSTEMTIME now;
        GetSystemTime(&now);
        if (!SystemTimeToFileTime(&now, &mtime) ||
            !SystemTimeToFileTime(&now, &atime)) {
            PyErr_SetFromWindowsErr(0);
            goto exit;
        }

The problem is GetSystemTime has poor resolution (milliseconds). Instead, it could call GetSystemTimeAsFileTime which writes directly into a FILETIME structure, and potentially (?) has better resolution.

(according to a comment on MSDN, "Resolution on Windows 7 seems to be sub-millisecond": http://msdn.microsoft.com/en-us/library/windows/desktop/ms724397%28v=vs.85%29.aspx )
History
Date User Action Args
2013-11-23 01:15:52pitrousetrecipients: + pitrou, tim.peters, loewis, larry, tim.golden, brian.curtin, steve.dower
2013-11-23 01:15:52pitrousetmessageid: <1385169352.32.0.642692439706.issue19727@psf.upfronthosting.co.za>
2013-11-23 01:15:52pitroulinkissue19727 messages
2013-11-23 01:15:50pitroucreate