|
From: | Paul Eggert |
Subject: | Re: master 4a1f69ebca 2/2: Use (TICKS . HZ) for current-time etc. |
Date: | Thu, 28 Apr 2022 15:27:52 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 4/27/22 09:55, Stefan Monnier wrote:
Instead of rounding the times to whole seconds, wouldn't it make more sense to check that the difference is larger than 1s?
org-file-newer-than-p is intended to work on filesystems like HFS+ that store just the seconds part of the last-modified time. Since these filesystems take the floor of the system time, taking the floor should be the most-accurate way to work around timestamp truncation issues, where comparing one timestamp that comes from an HFS+ filesystem to another timestamp coming from some other source (which is how org-file-newer-than-p is used).
The code won't work as desired on filesystems like FAT where the last-modified time has only 2-second resolution. Ideally Emacs Lisp code would have access to file timestamp resolution but that's not something it has now, so I merely preserved org-file-newer-than-p's assumption that taking the floor is good enough.
[Prev in Thread] | Current Thread | [Next in Thread] |