msg158084 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2012-04-11 22:29 |
Python 3.3 supports the following clock identifiers: * CLOCK_REALTIME * CLOCK_MONOTONIC * CLOCK_MONOTONIC_RAW * CLOCK_HIGHRES * CLOCK_PROCESS_CPUTIME_ID * CLOCK_THREAD_CPUTIME_ID Linux has more clocks: * CLOCK_BOOTTIME * CLOCK_REALTIME_COARSE * CLOCK_MONOTONIC_COARSE * CLOCK_BOOTTIME_ALARM * CLOCK_REALTIME_ALARM FreeBSD has more clocks: * CLOCK_VIRTUAL * CLOCK_UPTIME, CLOCK_UPTIME_FAST, CLOCK_UPTIME_PRECISE * CLOCK_MONOTONIC_FAST, CLOCK_MONOTONIC_PRECISE * CLOCK_REALTIME_FAST, CLOCK_REALTIME_PRECISE * CLOCK_SECOND * CLOCK_PROF CLOCK_BOOTTIME is useful is you would like to handle system suspend for example. |
|
|
msg158085 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2012-04-11 22:30 |
Extract of FreeBSD manpage of clock_gettime: The clock_id argument can be one of the following values: CLOCK_REALTIME, CLOCK_REALTIME_PRECISE, CLOCK_REALTIME_FAST for time that increments as a wall clock should; CLOCK_MONOTONIC, CLOCK_MONOTONIC_PRECISE, CLOCK_MONOTONIC_FAST which increments in SI seconds; CLOCK_UPTIME, CLOCK_UPTIME_PRECISE, CLOCK_UPTIME_FAST which starts at zero when the kernel boots and increments monotonically in SI seconds while the machine is running; CLOCK_VIRTUAL for time that increments only when the CPU is running in user mode on behalf of the calling process; CLOCK_PROF for time that increments when the CPU is running in user or kernel mode; or CLOCK_SECOND which returns the current second without performing a full time counter query, using in-kernel cached value of current second. The clock IDs CLOCK_REALTIME_FAST, CLOCK_MONOTONIC_FAST, CLOCK_UPTIME_FAST are analogs of corresponding IDs without _FAST suffix but do not perform a full time counter query, so their accuracy is one timer tick. Similarly, CLOCK_REALTIME_PRECISE, CLOCK_MONOTONIC_PRECISE, CLOCK_UPTIME_PRECISE are used to get the most exact value as possible, at the expense of execution time. |
|
|
msg158167 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2012-04-12 20:25 |
more_clock_ids.patch: add more clock identifiers. Don't add the following clocks: CLOCK_BOOTTIME_ALARM, CLOCK_REALTIME_ALARM, CLOCK_UPTIME_FAST, CLOCK_UPTIME_PRECISE, CLOCK_MONOTONIC_PRECISE, CLOCK_REALTIME_PRECISE. The documentation should be improved :-/ |
|
|
msg158227 - (view) |
Author: Jim Jewett (Jim.Jewett) * |
Date: 2012-04-13 19:15 |
Any particular reason not to add those? |
|
|
msg158237 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2012-04-13 21:41 |
> Any particular reason not to add those? I didn't find yet documentation of: CLOCK_BOOTTIME_ALARM, CLOCK_REALTIME_ALARM For CLOCK_UPTIME_PRECISE, CLOCK_MONOTONIC_PRECISE, CLOCK_REALTIME_PRECISE: I don't know if there are useful. Are they different than the clocks without _PRECISE suffix? For CLOCK_UPTIME_FAST, it's just that I forgot to add it :-) |
|
|
msg187260 - (view) |
Author: Mark Lawrence (BreamoreBoy) * |
Date: 2013-04-18 15:25 |
If nothing else the patch will need updating to show versionadded as 3.4 instead of 3.3. |
|
|
msg187793 - (view) |
Author: Kirsten Stevenson (ransomedheart08) |
Date: 2013-04-25 17:23 |
I have added descriptions for CLOCK_BOOTTIME_ALARM and CLOCK_REALTIME_ALARM to the patch. |
|
|
msg238413 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2015-03-18 11:02 |
I'm no more really interested to add these identifiers. So I just close the issue. |
|
|