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 vxgmichel
Recipients vxgmichel
Date 2020-01-29.18:26:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580322406.27.0.994848687035.issue39484@roundup.psfhosted.org>
In-reply-to
Content
I thought about it a bit more and I realized there is no way to recover the time in hundreds of nanoseconds from the float produced by `time.time()` (since the windows time currently takes 54 bits and will take 55 bits in 2028). 

That means `time()` and `time_ns()` cannot be compared by converting time() to nanoseconds, but it might still make sense to compare them by converting time_ns() to seconds (which is apparently broken at the moment).

If that makes sense, a possible roadmap to tackle this problem would be:
- fix `_PyTime_AsSecondsDouble` so that `time.time_ns() / 10**9 == time.time()`
- add a warning in the documentation that one should be careful when comparing the timestamps produced by `time()` and time_ns()` (in particular, `time()` should not be converted to nanoseconds)
History
Date User Action Args
2020-01-29 18:26:46vxgmichelsetrecipients: + vxgmichel
2020-01-29 18:26:46vxgmichelsetmessageid: <1580322406.27.0.994848687035.issue39484@roundup.psfhosted.org>
2020-01-29 18:26:46vxgmichellinkissue39484 messages
2020-01-29 18:26:46vxgmichelcreate