Zhaoming Luo, le lun. 17 févr. 2025 12:21:53 +0800, a ecrit:
> On Sun, Feb 16, 2025 at 10:30:17AM +0100, Samuel Thibault wrote:
> > Hello,
> > 
> > Zhaoming Luo, le dim. 16 févr. 2025 15:59:41 +0800, a ecrit:
> > > In the test[0] of vim. I think the issue is that the sleep time is not
> > > long enough. Sleep for 200ms is possible to pass the test, though the
> > > possibility is not that high. I think sleep for 2 seconds might be a
> > > good option.
> > 
> > Indeed, file timestamps still have 1s-granularity for now.
> > 
> > > Should we just submit a patch to Debian?
> > 
> > As usual, better submit usptream. There is no reason for Debian to
> > maintain such a patch for upstream code.
> > 
> Indeed, this is about the backward compactability of vim.
> 
> Vim should use has('nanotime') to wrap it, just like [0].

Indeed.

> The issue I have now is that Vim set has('nanotime') == 1 when it
> finds st_mtim.tv_nse of struct stat[1][2], and indeed we have it in
> glibc[3], so from the perspective of Hurd, we do support nanotime.

Well, yes and no: it's not just because the API provides the field that
all filesystems will have sub-second precision.

> However, our current filesystem driver ext2fs does not support the
> sub-second precision. Maybe we can propose adding a ./configure option
> to manually turn off the has('nanotime')?

That can be useful yes.

Samuel

Reply via email to