Subject: bug#55163: 29.0.50; master 4a1f69ebca (TICKS . HZ) for current-time broke lsp-mode

From: Paul Eggert <[email-masked]>
Date: Sun, 1 May 2022 09:17:09 -0700

On 5/1/22 08:42, Eli Zaretskii wrote:

> Out of these, only the 3rd one could qualify, because it's the only
> one where performance counts.

I'm sure other places can be found like that. And even one such 
occurrence can be enough motivation.

> And then those issues will have to be handled by Lisp application
> programmers?

No, not at all. We could write the code in Elisp and put it into 
files.el or wherever. The point is that this sort of thing need not and 
should not be written in C.

>> erc-server-send-ping, progress-reporter-do-update, timer-event-handler.
>> I'm sure there are others.
> 
> We don't need wallclock time for those, only elapsed time since some
> instant, right?  When elapsed time is used, the monotonicity issue
> never arises.

I'm not sure what is meant by the distinction between a monotonic clock 
and an elapsed-time clock. Either way, current-time does not suffice.

GNU/Linux has many types of monotonic clocks. We don't need to expose 
them all to the user. But Emacs apps do need at least one such clock, 
and POSIX's CLOCK_MONOTONIC is a portable way to get one.