summaryrefslogtreecommitdiffstats
path: root/buffy.h
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2018-06-14 16:17:56 +0800
committerKevin McCarthy <kevin@8t8.us>2018-06-18 13:05:15 +0800
commit120f63a9bea469e9980cf0270a1bb54841051015 (patch)
tree6f79cf91c8b53750d7daee1708bcfc929539e077 /buffy.h
parent7ec17b81882bcc58fd7f73bef8ef4b74439eb3f8 (diff)
Convert context and buffy to use nanosecond timestamps.
The inotify interface has an unfortunate side effect of making Mutt react too quickly to new mail. Sometimes, the mail is only half-delivered when the mailbox is checked. Because Mutt is using the stat mtime - seconds resolution - this means it won't realize there are more messages delivered during the same second. Nanosecond resolution fields were standardized in POSIX.1-2008, so check for and use those if they are available.
Diffstat (limited to 'buffy.h')
-rw-r--r--buffy.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/buffy.h b/buffy.h
index 561f5e7f..c0cfddf4 100644
--- a/buffy.h
+++ b/buffy.h
@@ -40,8 +40,8 @@ typedef struct buffy_t
short notified; /* user has been notified */
short magic; /* mailbox type */
short newly_created; /* mbox or mmdf just popped into existence */
- time_t last_visited; /* time of last exit from this mailbox */
- time_t stats_last_checked; /* mtime of mailbox the last time stats where checked. */
+ struct timespec last_visited; /* time of last exit from this mailbox */
+ struct timespec stats_last_checked; /* mtime of mailbox the last time stats where checked. */
}
BUFFY;