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.

Author mark.dickinson
Recipients larry, lemburg, mark.dickinson, rhettinger, serhiy.storchaka, stutzbach, vstinner, vxgmichel
Date 2020-02-09.15:28:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581262089.06.0.451796966853.issue39484@roundup.psfhosted.org>
In-reply-to
Content
Here's another way to see it. Let's get the Unix timestamp for right now:

>>> from datetime import datetime
>>> epoch = datetime(1970, 1, 1)
>>> now = (datetime.now() - epoch).total_seconds()
>>> now
1581261916.910558

Now let's figure out the resolution, by taking the next float up from that value and subtracting.

>>> from math import nextafter, inf
>>> nextafter(now, inf) - now
2.384185791015625e-07

That's 2**-22, or a little bit less than a quarter of a microsecond. We're out from our desired resolution (1ns) by a factor of ~239, so it's going to take another 8 bits (factor of 256) to get us there.
History
Date User Action Args
2020-02-09 15:28:09mark.dickinsonsetrecipients: + mark.dickinson, lemburg, rhettinger, vstinner, larry, stutzbach, serhiy.storchaka, vxgmichel
2020-02-09 15:28:09mark.dickinsonsetmessageid: <1581262089.06.0.451796966853.issue39484@roundup.psfhosted.org>
2020-02-09 15:28:09mark.dickinsonlinkissue39484 messages
2020-02-09 15:28:08mark.dickinsoncreate