[Python-Dev] PEP 564: Add new time functions with nanosecond resolution (original) (raw)

Guido van Rossum guido at python.org
Sat Oct 21 11:45:37 EDT 2017


That sounds like unnecessary generality, and also suggests that the API might support precisions way beyond what is realistic.

On Sat, Oct 21, 2017 at 4:39 AM, francismb <francismb at email.de> wrote:

Hi Victor,

On 10/18/2017 01:14 AM, Victor Stinner wrote: > I updated my PEP 564 to add time.processtimens(): > https://github.com/python/peps/blob/master/pep-0564.rst > > The HTML version should be updated shortly: > https://www.python.org/dev/peps/pep-0564/ ** In practive, the resolution of 1 nanosecond ** ** no need for resolution better than 1 nanosecond in practive in the Python standard library.** practice vs practice

If I understood you correctly on Python-ideas (here just for the records, otherwise please ignore it): why not something like (please change 'in' for what you like): time.timein(precision) time.monotonicin(precision) where precision is an enumeration for: 'seconds', 'milliseconds' 'microseconds'... (or 's', 'ms', 'us', 'ns', ...) Thanks, --francis


Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/ guido%40python.org

-- --Guido van Rossum (python.org/~guido) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20171021/0ac8158e/attachment.html>



More information about the Python-Dev mailing list