emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Support for sub-second time in decoded time


From: Lars Ingebrigtsen
Subject: Support for sub-second time in decoded time
Date: Mon, 29 Jul 2019 11:48:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Currently, encoded time has support for picoseconds.  `decode-time' will
throw away all sub-second time, which makes accurate round-tripping
impossible.

I mentioned this in a bug report, I think, but didn't get any response.
I proposed to extend the list returned by `decode-time' (and accepted by
`encode-time') to accommodate this -- I think this can be done in a
backwards-compatible manner.

`current-time' returns its data as (HIGH LOW USEC PSEC), but now that we
have bignum support, perhaps we don't need to do it this way.  What
about just having a field in decoded times that's the fraction of a
second?  So 34.5603 seconds would be represented as

(34 ... 5603)

Opinions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




reply via email to

[Prev in Thread] Current Thread [Next in Thread]