Message361654
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. |
|
Date |
User |
Action |
Args |
2020-02-09 15:28:09 | mark.dickinson | set | recipients:
+ mark.dickinson, lemburg, rhettinger, vstinner, larry, stutzbach, serhiy.storchaka, vxgmichel |
2020-02-09 15:28:09 | mark.dickinson | set | messageid: <1581262089.06.0.451796966853.issue39484@roundup.psfhosted.org> |
2020-02-09 15:28:09 | mark.dickinson | link | issue39484 messages |
2020-02-09 15:28:08 | mark.dickinson | create | |
|