From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Support for sub-second time in decoded time Date: Mon, 29 Jul 2019 11:48:02 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="197196"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 29 11:48:16 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hs2GM-000p9l-QE for ged-emacs-devel@m.gmane.org; Mon, 29 Jul 2019 11:48:14 +0200 Original-Received: from localhost ([::1]:50812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hs2GL-00052B-LZ for ged-emacs-devel@m.gmane.org; Mon, 29 Jul 2019 05:48:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60570) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hs2GH-000524-4q for emacs-devel@gnu.org; Mon, 29 Jul 2019 05:48:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hs2GG-0000Wx-1M for emacs-devel@gnu.org; Mon, 29 Jul 2019 05:48:09 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:35116) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hs2GF-0000WA-QD for emacs-devel@gnu.org; Mon, 29 Jul 2019 05:48:07 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hs2GA-0000b4-Rk for emacs-devel@gnu.org; Mon, 29 Jul 2019 11:48:05 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXw4sqykINZDASXcGD+ /OtyPB/SuK5HtkdZAAACfElEQVQ4jXWTsXLbMAyG4ZrVLEaq5oY5d7ZKyTN5wXFOlCgzWat4/0fo D8pxlxZ3uVD8APwAAVO00Q+ZmmLtsvHBW5FshsNGJTYi0gH+chc7SiZq8sY9bSngerTZPLhHhBIV n/vQE3OaEZ+p/HQvBu6dtdvlakgkjlYaa+2De4G7hYiJAwMkEeu9zV/ci9jB5qb0FoBDEEgg+283 iNRcW4tUjUWJNpPgj4MJxQ+y9Wmj4Zwg3XTjxjBoSRbTh40u5yBNQV16z0W0174tSNVRgUTJFQQE db63mWm8RH0G2cxOUK81LVKZmGxGwb0CaA+SszlElJsIlVsxCiigDmjEC9N2DI0dpAEIcCMS9MET 01XLRRc30CCXGAUck+TSWVaQWJ+TDPcK4A4vVo3EotPZ4siUS7Kd9ziZQAf+tr6t63REHaWNfvZv r0EjIs+L9+sUkUq647rO62vIFSAYgIUptc8r7KPBLPmZZ2SdJylMlxArSLdU8zr4KW1M1h7/RkSa 9WNqk6HRV7A+BQUOJ2gMANxUsDzp2z47rXadus6QPVfx5VFBPNXoaTgYaveq1h+aKq07yNFgfMfF wfEDLwSNau9GNcKxfnzXt0s3ENC5PXz9BHwH6Vw7rx9nTRVQhYJnbGIZjjcAAlAjDhajpBpxanGi gICTW94FK5pu4hWQgtW952Aoph3kCua9j4JUh+ZaFes9/VwXBYK9Emy7mv4Q5B5xZfK+VDA737mx Hv2ETaZo4v5Aznu332OCWIZktNwTZMDWz0dkneDVnXDrXGW1wUm3SadzWrSu2sMeMfEOdlPvG8DG 6jLcwWfI1NaI6O827//6iyj4h0n+D4D9AehP82BHjrQVAAAAAElFTkSuQmCC X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.231.51 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238989 Archived-At: 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