Vincent Michel <[email protected]> added the comment:
> The problem is that there is a double rounding in [...]
Actually `float(x) / 1e9` and `x / 1e9` seems to produce the same results:
```
import time
import itertools
now = time.time_ns()
for x in itertools.count(now):
assert float(x) / 1e9 == x / 1e9
```
> The formula `time = time_ns / 10**9` may be more accurate.
Well that seems to not be the case, see the plots and the corresponding code. I
might have made a mistake though, please let me know if I got something wrong :)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39484>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com