[issue10278] add time.wallclock() method

2012-03-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c11946846474 by Victor Stinner in branch 'default': Issue #10278: Drop time.monotonic() function, rename time.wallclock() to time.steady() http://hg.python.org/cpython/rev/c11946846474 --

[issue10278] add time.wallclock() method

2012-03-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 27441e0d6a75 by Victor Stinner in branch 'default': Issue #10278: Add an optional strict argument to time.steady(), False by default http://hg.python.org/cpython/rev/27441e0d6a75 --

[issue10278] add time.wallclock() method

2012-01-23 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset fb0f4fe8123e by Victor Stinner in branch 'default': Issue #10278: wallclock() cannot go backward, but two consecutive calls http://hg.python.org/cpython/rev/fb0f4fe8123e --

[issue10278] add time.wallclock() method

2012-01-19 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8502a9236c2e by Victor Stinner in branch 'default': Issue #10278: Be more explicit in tests than wallclock() is monotonic (cannot http://hg.python.org/cpython/rev/8502a9236c2e --

[issue10278] add time.wallclock() method

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: There are some issue on the Windows buildbots: == FAIL: test_wallclock (test.test_time.TimeTestCase) --

[issue10278] add time.wallclock() method

2012-01-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 83e8c3a6a81c by Antoine Pitrou in branch 'default': Be more lenient in test_wallclock (issue #10278). http://hg.python.org/cpython/rev/83e8c3a6a81c -- ___ Python tracker

[issue10278] add time.wallclock() method

2012-01-18 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10278 ___ ___ Python-bugs-list

[issue10278] add time.wallclock() method

2012-01-17 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset bb10cd354e49 by Victor Stinner in branch 'default': Close #10278: Add time.wallclock() function, monotonic clock. http://hg.python.org/cpython/rev/bb10cd354e49 -- resolution: - fixed stage: patch review -

[issue10278] add time.wallclock() method

2012-01-17 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1de276420470 by Victor Stinner in branch 'default': Issue #10278: fix a typo in the doc http://hg.python.org/cpython/rev/1de276420470 -- ___ Python tracker

[issue10278] add time.wallclock() method

2012-01-16 Thread akira
Changes by akira 4kir4...@gmail.com: -- nosy: +akira ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10278 ___ ___ Python-bugs-list mailing list

[issue10278] add time.wallclock() method

2012-01-08 Thread Matthias Klose
Matthias Klose d...@debian.org added the comment: on linux the underlying functionality is implemented in librt; the extension doesn't check for this or links with -lrt. -- nosy: +doko ___ Python tracker rep...@bugs.python.org

[issue10278] add time.wallclock() method

2012-01-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: on linux the underlying functionality is implemented in librt; the extension doesn't check for this or links with -lrt. The changeset 35e4b7c4bafa changed configure.in to check clock_gettime(). It checks without and with librt:

[issue10278] add time.wallclock() method

2011-11-29 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Version 3 of the patch: check for clock_gettime() failure. Try CLOCK_MONOTONIC_RAW, or try CLOCK_MONOTONIC, or use time.time(). -- Added file: http://bugs.python.org/file23809/wallclock-3.patch

[issue10278] add time.wallclock() method

2011-11-28 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: wallclock-2.patch: implement wallclock() using the new clock_getime(CLOCK_MONOTONIC) function (or other, depending on the OS). I removed description on how the function is implemented from the doc. -- Added file:

[issue10278] add time.wallclock() method

2011-11-28 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As discussed elsewhere, there should be a fallback when clock_gettime() fails for the given clock. -- stage: committed/rejected - patch review ___ Python tracker rep...@bugs.python.org

[issue10278] add time.wallclock() method

2011-11-25 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10278 ___ ___ Python-bugs-list

[issue10278] add time.wallclock() method

2011-11-25 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: -michael.foord versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10278 ___

[issue10278] add time.wallclock() method

2011-10-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The issue #13261 has been marked as a duplicate of this issue. Copy of msg146347: - time.clock () has very poor time resolution on Linux (tested on Ubuntu 11.04). The result of call to clock () changes once per several

[issue10278] add time.wallclock() method

2011-10-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID are optional according to POSIX, which only mandates CLOCK_REALTIME. You should mention it in the docs. You might also want to export clock_getres():

[issue10278] add time.wallclock() method

2011-10-25 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 35e4b7c4bafa by Victor Stinner in branch 'default': Close #10278: Add clock_getres(), clock_gettime() and CLOCK_xxx constants to http://hg.python.org/cpython/rev/35e4b7c4bafa -- nosy: +python-dev resolution:

[issue10278] add time.wallclock() method

2011-10-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I closed maybe this issue too quickly. My commit doesn't solve the initial issue: Python doesn't provide a portable wallclock function. wallclock.patch should be updated to use: - time.clock() on Windows (use

[issue10278] add time.wallclock() method

2011-09-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: clock_gettime.patch: add time.clock_gettime() function and time.CLOCK_xxx constants. The patch requires to rerun autoconf. For the documentation, I don't know the availability of this function. Is it available on Windows?

[issue10278] add time.wallclock() method

2011-08-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I think that we should process in two steps: * Expose low level C functions * Write a high level reusing the best low level function depending on the OS Low level functions: * Expose clock_gettime() into the time module, with

[issue10278] add time.wallclock() method

2011-08-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Note: it would be very pratical if time.monotonic() has always the same unit on all platforms. clock_gettime() uses seconds (and nanoseconds), time.clock() uses also seconds. -- ___

[issue10278] add time.wallclock() method

2011-08-30 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: The problem with QueryPerformanceCounter is that it drifts. It has high resolution, but can drift far out of sync with GetTickCount64. The best solutions on windows combine the two, but that's tricky to impolement. QPC will wrap,

[issue10278] add time.wallclock() method

2011-08-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #12822. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10278 ___ ___

[issue10278] add time.wallclock() method

2011-07-07 Thread Matt Joiner
Matt Joiner anacro...@gmail.com added the comment: What's the status of this bug? This is a very useful feature, I've had to use and add bindings to monotonic times for numerous applications. Can it make it into 3.3? -- ___ Python tracker

[issue10278] add time.wallclock() method

2011-01-14 Thread Matt Joiner
Matt Joiner anacro...@gmail.com added the comment: This is sorely needed. IMO the current behaviour of time.clock works for Windows, and clock_gettime(CLOCK_MONOTONIC) on POSIX or clock_gettime(CLOCK_MONOTONIC_RAW) on Linux=2.6.28. There are some related discussions on StackOverflow that may

[issue10278] add time.wallclock() method

2011-01-14 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: In Windows, it should probably use GetTickCount64 if available, otherwise GetTickCount with logic to handle wrapping. I think QueryPerformanceCounter is problematic as a general-purpose timer: depending on the hardware and Windows version, it

[issue10278] add time.wallclock() method

2011-01-13 Thread Glenn Maynard
Glenn Maynard glennfmayn...@gmail.com added the comment: I agree with Victor: Python should provide a function to supply monotonic time, which is what's really wanted for measuring time deltas. Far too many applications incorrectly use the system clock for this, and Python makes this worse

[issue10278] add time.wallclock() method

2010-11-01 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson krist...@ccpgames.com: If measuring time across blocking calls, such as thread synchronization, one currently must time.time(). This is because time.clock() measures cpu seconds on unix. On windows, however, time.clock() would be more appropriate

[issue10278] add time.wallclock() method

2010-11-01 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: +1 -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10278 ___ ___

[issue10278] add time.wallclock() method

2010-11-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10278 ___ ___

[issue10278] add time.wallclock() method

2010-11-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Why does this need to be in stdlib? AFAICT, the proposed patch is just: if appropriate test: wallclock = time.clock else: wallclock = time.time which is easy enough to stick in your measuring code or a project's

[issue10278] add time.wallclock() method

2010-11-01 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10278 ___ ___ Python-bugs-list

[issue10278] add time.wallclock() method

2010-11-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, the problem is that the appropriate test is not easy to guess a priori, so it would be useful for the stdlib to provide the right tool for the job. As for where it should live, I have no strong opinion, but it's true that the time module

[issue10278] add time.wallclock() method

2010-11-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Mon, Nov 1, 2010 at 1:43 PM, Antoine Pitrou rep...@bugs.python.org wrote: .. Well, the problem is that the appropriate test is not easy to guess a priori, so it would be useful for the stdlib to provide the right

[issue10278] add time.wallclock() method

2010-11-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, the problem is that the appropriate test is not easy to guess a priori, so it would be useful for the stdlib to provide the right tool for the job. This sounds like an argument against this feature, not for it. If it is hard for

[issue10278] add time.wallclock() method

2010-11-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Mon, Nov 1, 2010 at 2:09 PM, Antoine Pitrou rep...@bugs.python.org wrote: .. Well, the problem is that the appropriate test is not easy to guess a priori, so it would be useful for the stdlib to provide the right

[issue10278] add time.wallclock() method

2010-11-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Mon, Nov 1, 2010 at 2:09 PM, Antoine Pitrou rep...@bugs.python.org wrote: .. The problem is time.clock(), since it does two wildly different things depending on the OS. I would suggest to deprecate time.clock() at the

[issue10278] add time.wallclock() method

2010-11-01 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Certainly. I was going to put this simple code in time.py when I realized that time was a C module. The main point, as Antoine points out, is that time.clock() means two seriously different things on the two main platforms, and

[issue10278] add time.wallclock() method

2010-11-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: 2010/11/1 Kristján Valur Jónsson rep...@bugs.python.org: .. I put in the patch since it was quick to do, but I'll provoke a discussion on python-ideas for now. I am looking forward to it. You may find reviewing the

[issue10278] add time.wallclock() method

2010-11-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I would also be nice to have a monotonic clock in Python. See monotonic.py for an example. But I don't know if it solves the same problem than time.wallclock() or not. I need a monotonic clock for a server on which NTP is

[issue10278] add time.wallclock() method

2010-11-01 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Well, that is sort of what I'm trying to achieve. Note that you probably want to use QueryPerformaceCounter on windows (or simply time.clock()) or at least GetTickCount64 which doesn't wrap around after 50 days :). Also, I'm