From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Time resolution in Emacs Date: Sat, 23 Apr 2022 17:56:01 -0700 Organization: UCLA Computer Science Department Message-ID: <55cea2fb-958a-7ca8-a26c-90b0e70e5ada@cs.ucla.edu> References: <5ed963b2-3fa8-48d8-627e-bc0571d15b43@gmail.com> <2dd15844-01b3-0144-740c-185ec8488a81@cs.ucla.edu> <4a23f3a4-fe8f-d396-49d8-10034803be63@gmail.com> <52fb10fb-892a-f273-3be8-28793f27e204@cs.ucla.edu> <5cd820d4-ae67-43d4-9e63-c284d51ff1e4@gmail.com> <83tuapvcxs.fsf@gnu.org> <6efc5d24-34a2-fd30-cd20-fe4ac3e48310@cs.ucla.edu> <83fsm8tdzl.fsf@gnu.org> <9e4781b2-2ffa-b1ce-09b4-ead82cad9038@cs.ucla.edu> <83ilr3siku.fsf@gnu.org> <4e41671c-fae8-61c4-845c-4c7ba4317e88@cs.ucla.edu> <83fsm7sh2s.fsf@gnu.org> <83czhbsgc2.fsf@gnu.org> <33fb24fb-282b-cc13-a597-e7b63f19982d@cs.ucla.edu> <83y1zzq6kd.fsf@gnu.org> <837d7hr8s3.fsf@gnu.org> <83czh8pb54.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35644"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Cc: manikulin@gmail.com, corwin@bru.st, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 24 02:56:51 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 1niQYV-0009A9-Uc for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Apr 2022 02:56:51 +0200 Original-Received: from localhost ([::1]:55156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niQYU-0000s5-I5 for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Apr 2022 20:56:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niQXq-0000A9-Gz for emacs-devel@gnu.org; Sat, 23 Apr 2022 20:56:10 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59012) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niQXm-00031P-Hh; Sat, 23 Apr 2022 20:56:09 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9FC4A16009A; Sat, 23 Apr 2022 17:56:02 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id AALs-61dbPjI; Sat, 23 Apr 2022 17:56:01 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BD5701600C5; Sat, 23 Apr 2022 17:56:01 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LSZEtz_590df; Sat, 23 Apr 2022 17:56:01 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 8D33716009A; Sat, 23 Apr 2022 17:56:01 -0700 (PDT) Content-Language: en-US In-Reply-To: <83czh8pb54.fsf@gnu.org> Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:288824 Archived-At: On 4/22/22 23:27, Eli Zaretskii wrote: > There's no reason to expect Emacs to be > able to support such applications on all platforms. Quite right. Many people don't synchronize their clocks at all, and on their systems Emacs can't generate accurate timestamps. However, that doesn't mean Emacs should be sloppy about timestamps. If an OS has two low-level time primitives A and B, and A's resolution is 100 ms while B's is 1 ms, surely Emacs should prefer B. Using B helps apps that can use 1-ms timestamps in a well-synchronized environment, and it doesn't hurt apps that don't care about timestamp resolution. > Not to mention > that synchronizing clocks to millisecond accuracy on non-RT systems is > in most cases futile, because the OS doesn't provide reliable timings > to that accuracy anyway. Even if one limits one's attention to NTP on non-realtime systems it's not hard to get agreement on a LAN to better than 10 ms, counting OS jitter. And better-than-10-ms accuracy is growing in popularity, due to applications that need good clocks and get them via PTP or other means. I regularly use networks that are synchronized better than 10 ms, and I wouldn't pooh-pooh the need for this sort of thing in apps that coordinate with others. > We don't _insist_ on providing low-accuracy timestamps, but we should > definitely be certainly concerned about adding such non-trivial > complexity to Emacs It sounds like we have miscommunicated, as this comment seems to disagree with your email of a couple of days ago that said "There's no problem whatsoever to provide high-resolution time stamps on MS-Windows". If the question is whether to use a less-accurate method A or more-accurate method B to obtain timestamps, where Emacs continues its current practice of converting the timestamps to 1-nanosecond resolution internally before the user sees the timestamps, then I don't see why Emacs should prefer A to B.