Chris is certainly right. A program that deals with femtosecond intervals should almost surely start by defining a "start of experiment" epoch where microseconds are fine. Then within that epoch, events should be monotonic integers for when measured or calculated times are marked.
I can easily see reasons why a specialized wrapped int for FemtosecondsFromStart could be useful. But that's still a specialized need for a third party library. One possible use of this class might be to interoperate with datetimes or timedeltas. Conceivably sick interoperability could be dealing with leap seconds when needed. But "experiment time" should be a simple monotonic and uniform counter. On Mon, May 14, 2018, 6:35 PM Chris Barker - NOAA Federal via Python-ideas < python-ideas@python.org> wrote: > > > > UTC and leap seconds aren't a problem. > > Of course they are a problem— why else would they not be implemented > in datetime? > > But my point if that given datetimestamp or calculation could be off > by a second or so depending on whether and how leap seconds are > implemented. > > It just doesn’t seem like a good idea to be handling months and > femptoseconds with the same “encoding” > > -CHB > _______________________________________________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/