From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Function to make a struct timespec from a floating point number? Date: Fri, 21 Jan 2022 09:37:25 +0800 Message-ID: <87h79xzx62.fsf@yahoo.com> References: <87czkm1sry.fsf.ref@yahoo.com> <87czkm1sry.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32188"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 21 02:49:00 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAj2x-00087a-7l for ged-emacs-devel@m.gmane-mx.org; Fri, 21 Jan 2022 02:48:59 +0100 Original-Received: from localhost ([::1]:51932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAj2v-0001x0-Ul for ged-emacs-devel@m.gmane-mx.org; Thu, 20 Jan 2022 20:48:57 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAirw-0003UQ-5Z for emacs-devel@gnu.org; Thu, 20 Jan 2022 20:37:36 -0500 Original-Received: from sonic315-21.consmr.mail.ne1.yahoo.com ([66.163.190.147]:41950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAiru-0004NB-7i for emacs-devel@gnu.org; Thu, 20 Jan 2022 20:37:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1642729052; bh=1uvhfuAU1HIaCfLgTn/WswMDkwmSObDXAQnGIWigL8g=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=NrJWVxybB2no7sBUGcTvP1CG5PAGRKo/4Hd55D1AIr7YFf2WvMAsUSVpUlgrAYAYZ+YLnjQuLFC/tq0DycKvHIy0pF7H9UADSfqCwfuvRIHenFsatIai5QmhXWW2mpmMbm43G1oOhEoK0nZB7AfdUYjXg2QqLdQMyCPZnMgMD9WAFJRLdqpQD3atQe/GCzbW/lABmZoH4bqGuMu1vZ8Lr4ZMJCCOuR71CZtkwH2s5II5Eb/CBq7h1nUEy4Nc07lQEN3yD8wX42Yb3hDYnqDLTJ0P3PTMb7LoaofNG8+p1/GQGHSq8BUQaaOgK5ps9ZcvxvtmjNkqBFIbBAucqlKiFQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1642729052; bh=q9ZmoOq4yubQ9bLzUIrBO3ZgTHdvO6mNPTYGspzdAUq=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=nIgkXo/4kxc3IrocUlf5mbkZk10vq8r4Ri8ol0m3e4SmXBoNEkfLMUEb0Wp2KR/tNYhyti5d6B5qwrInpRCmMjDvucGqyEyicGKxvW41mG93nTRYgWcluZz0eyzzFITTzRrMVob6eSN1luM74gt+aB+l97kAZmr8NVtSntJPHEtjFW4wvOeVdhv+bWdjJkQxtyO7pU8ZiNvyGrJNT7EDob8MhZCwj24bzJYH/ue3BwnTSD0pftcUAPj3IRVD/hpb1ue6UoFAOPvZzWSGqGg8KO1uxcGwHQ/WZEnrP7Vm0n8Ic+4qqOO/HgpeLMapcTewZy+3CbQKKefxXImgG4WZBQ== X-YMail-OSG: jLrYADEVM1mDC9Ztbvkw2YHuHofJ..wXp3yXQq0YpHmonwxNGLvnZ1kCvINqyZM JKIZwXkvqKJgVFkQZtYtuJy6CTmHmrw3KZ66_fBM93RWWP_BxHmanR..4AFAFTJtzxRUZRDu0pUR 9UsqDyZDG08uJ_irPnEsa2xqtJ1dNeg5TLSiyu6aABQiRoznLOT_DXodeS7dAFuFQU3a.Bcza0xl qIDBPcP52TJix6MWik7cKIW1xx.jy9SkBtppIa73JaJE2NuoafW7fk98BrtHNyLv8gDiRYYT9.Lj l1NdnITzmyCICnEXzapJwjccn6I.hQQ.vgqXJC1kbh4.kBm4oIqooONa34DaZP6M.o3U3jDkT_EB 7rXnC0MeubH2SNGuPMnNKSugIEYsmM_oXVdzmlGOrKUyhM_PIR4XwawSCoB0rAHbLd59SVQAhXl2 wSilQ_vaMk9Mb7XE7TwyHMQ_G4OIXXMKQ2OrwE4nJByJpR.Rqih29ArMUW.EZkxl.knBzbD2eMmm 3LnsuLtxQZgkpnqOkqF5YJ1VDc8lovFjDUSqTNZYnGrOHtZStjtr1ZZjr8IcBp5Dqtb2S_sojZ.G 5kqhmoacCAD8SOfuUWtUr7fvd3tCIFCnu8izF.3rNZXXGGzYdvF5krfTUkE34cCIVQUDXGGJ25S0 T3bZ23VH9klZdoDOXL1TMjofuwQh87RNlCZzYOYFSutq0mVYS7yegc1tFSJafGQ6fNKfOvcC.RMx 2ZhEum9ej.a3Cbmflr8QF41vDKOGjQ.RCEd4.g9dcKKhiBrufcyuWYqGwigGn1IPEMzirkZ5CxT8 qSKL9cnmy1slWI1Ie55_FedvfYDZOZEqmECIfXxyyQ X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.ne1.yahoo.com with HTTP; Fri, 21 Jan 2022 01:37:32 +0000 Original-Received: by kubenode508.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 1a879deb0338133ae3a6ccaa2054b69c; Fri, 21 Jan 2022 01:37:29 +0000 (UTC) In-Reply-To: (tomas@tuxteam.de's message of "Thu, 20 Jan 2022 19:21:26 +0100") X-Mailer: WebService/1.1.19615 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.190.147; envelope-from=luangruo@yahoo.com; helo=sonic315-21.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:285071 Archived-At: writes: > That might be `time-convert': > > (let* ((tim0 (current-time)) > (ftim (float-time tim0)) > (tim1 (time-convert ftim))) > (message "tim0: %S ftim: %S tim1: %S\n" tim0 ftim tim1)) > > => tim0: (25065 42935 269749 160000) ftim: 1642702775.2697492 tim1: (25065 42935 269749 164581) > > (some stuff in the lower bits seems to get lost in translation, alas :) Thanks, but that wasn't what I was looking for, since it deals with Lisp timestamps and not `struct timespec's on the C level.