vim-patch:8.2.3510: changes are only detected with one second accuracy

Problem:    Changes are only detected with one second accuracy.
Solution:   Use the nanosecond time if possible.  (Leah Neukirchen,
            closes vim/vim#8873, closes vim/vim#8875)
0a7984af56

In Nvim Test_checktime_fast() is also flaky. Add a delay to avoid that.
This commit is contained in:
zeertzjq
2022-02-13 21:33:28 +08:00
parent 6f5fae08a3
commit 03348e5b9d
5 changed files with 58 additions and 12 deletions

View File

@@ -587,7 +587,9 @@ struct file_buffer {
// where invoked
long b_mtime; // last change time of original file
long b_mtime_ns; // nanoseconds of last change time
long b_mtime_read; // last change time when reading
long b_mtime_read_ns; // nanoseconds of last read time
uint64_t b_orig_size; // size of original file in bytes
int b_orig_mode; // mode of original file
time_t b_last_used; // time when the buffer was last used; used