Issue 22624: Bogus usage of floatclock in timemodule
Created on 2014-10-13 18:34 by Link Mauve, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| pyconfig.h | Link Mauve, 2014-10-14 09:43 | |||
| Messages (7) | |||
|---|---|---|---|
| msg229260 - (view) | Author: (Link Mauve) | Date: 2014-10-13 18:34 | |
In Modules/timemodule.c, py_process_time() still uses floatclock() even when HAVE_CLOCK isn’t defined. |
|||
| msg229280 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2014-10-14 08:38 | |
What is your platform? time.process_time() supports many functions: - GetProcessTimes() (Windows only) - clock_gettime(CLOCK_PROF) - clock_gettime(CLOCK_PROCESS_CPUTIME_ID) - getrusage(RUSAGE_SELF) - times() - clock() On POSIX, clock() is always tried as a fallback. Does your platform support at least one of these functions? |
|||
| msg229281 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2014-10-14 08:38 | |
See also the PEP 418: http://legacy.python.org/dev/peps/pep-0418/#time-process-time |
|||
| msg229283 - (view) | Author: (Link Mauve) | Date: 2014-10-14 09:29 | |
I’m building against the Newlib libc, for the Wii, and it seems the issue leading to all of those functions not working is: (.text.clock+0x18): undefined reference to `_times_r' Threading is disabled, and reentrant functions as well, which could explain that. But still, when pyconfig.h doesn’t define any HAVE_ macro to get the system time, I would expect py_process_time() to return None or something instead of failing to build. |
|||
| msg229284 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2014-10-14 09:42 | |
Please attach your pyconfig.h file. |
|||
| msg269990 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2016-07-08 15:23 | |
Sorry but the Wii console is not supported. You have to maintain your fork/patch. Python 3 don't support platforms without clock(). |
|||
| msg269993 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2016-07-08 15:55 | |
New changeset 1452520dfe7b by Victor Stinner in branch 'default': Issue #22624: Python 3 requires clock() to build https://hg.python.org/cpython/rev/1452520dfe7b |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:09 | admin | set | github: 66814 |
| 2016-07-08 15:55:55 | python-dev | set | nosy:
+ python-dev messages: + msg269993 |
| 2016-07-08 15:23:05 | vstinner | set | status: open -> closed resolution: wont fix messages: + msg269990 |
| 2014-10-14 09:43:38 | Link Mauve | set | files: + pyconfig.h |
| 2014-10-14 09:42:13 | vstinner | set | messages: + msg229284 |
| 2014-10-14 09:29:33 | Link Mauve | set | messages: + msg229283 |
| 2014-10-14 08:38:27 | vstinner | set | messages: + msg229281 |
| 2014-10-14 08:38:03 | vstinner | set | messages: + msg229280 |
| 2014-10-14 00:01:53 | pitrou | set | nosy:
+ vstinner |
| 2014-10-13 18:34:55 | Link Mauve | create | |

