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.
Created on 2012年03月24日 10:44 by vstinner, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg156690 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2012年03月24日 10:44 | |
QueryPerformanceCounter() is not monotonic on a multiprocessor computer on Windows XP. Extract of its documentation: "Remarks On a multiprocessor computer, it should not matter which processor is called. However, you can get different results on different processors due to bugs in the basic input/output system (BIOS) or the hardware abstraction layer (HAL). To specify processor affinity for a thread, use the SetThreadAffinityMask function." See also: http://bytes.com/topic/python/answers/527849-time-clock-going-backwards time.steady(strict-True) (or "time.monotonic()"? the function name is not decided yet :§)) should use GetTickCounter64(), or GetTickCounter(). GetTickCount64() was added to Windows Seven / Server 2008. GetTickCount() overflows after 49 days. QueryPerformanceCounter() has a better resolution than GetTickCount[64]() and so it's maybe better to keep it for time.steady(strict-False)? |
|||
| msg156694 - (view) | Author: Yury Selivanov (Yury.Selivanov) * | Date: 2012年03月24日 13:56 | |
I vote for adding just one function to the 'time' module: monotonic(), which should exist only if the host OS support it. And I don't see the point of having 'steady()' at all. |
|||
| msg156695 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2012年03月24日 14:20 | |
A monotonic clock is not suitable for measuring durations, as it may still jump forward. A steady clock will not. |
|||
| msg156718 - (view) | Author: Yury Selivanov (Yury.Selivanov) * | Date: 2012年03月24日 20:14 | |
> A monotonic clock is not suitable for measuring durations, as it may still jump forward. A steady clock will not. Well, Victor's implementation of 'steady()' is just a tiny wrapper, which uses 'monotonic()' or 'time()' if the former is not available. Hence 'steady()' is a misleading name. |
|||
| msg156748 - (view) | Author: Marc-Andre Lemburg (lemburg) * (Python committer) | Date: 2012年03月25日 10:24 | |
Yury Selivanov wrote: > > Yury Selivanov <yselivanov@gmail.com> added the comment: > >> A monotonic clock is not suitable for measuring durations, as it may still jump forward. A steady clock will not. > > Well, Victor's implementation of 'steady()' is just a tiny wrapper, which uses 'monotonic()' or 'time()' if the former is not available. Hence 'steady()' is a misleading name. Agreed. I think time.monotonic() is a better name. |
|||
| msg157450 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2012年04月04日 00:18 | |
I'm closing this issue as a duplicate... of the PEP 418. See the python-dev mailing list for discussions on this PEP. |
|||
| msg159553 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年04月29日 00:44 | |
New changeset 76d2e0761d18 by Victor Stinner in branch 'default': Issue #14428, #14397: Implement the PEP 418 http://hg.python.org/cpython/rev/76d2e0761d18 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:28 | admin | set | github: 58605 |
| 2012年04月29日 00:44:14 | python-dev | set | nosy:
+ python-dev messages: + msg159553 |
| 2012年04月04日 00:18:28 | vstinner | set | status: open -> closed resolution: duplicate messages: + msg157450 |
| 2012年03月25日 10:24:27 | lemburg | set | nosy:
+ lemburg messages: + msg156748 |
| 2012年03月24日 20:14:29 | Yury.Selivanov | set | messages: + msg156718 |
| 2012年03月24日 14:20:17 | loewis | set | messages: + msg156695 |
| 2012年03月24日 13:56:08 | Yury.Selivanov | set | messages: + msg156694 |
| 2012年03月24日 13:53:14 | Yury.Selivanov | set | nosy:
+ Yury.Selivanov |
| 2012年03月24日 10:45:44 | vstinner | set | nosy:
+ loewis, tim.golden, brian.curtin |
| 2012年03月24日 10:44:41 | vstinner | create | |