diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-22 13:24:16 -0800 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-22 13:31:01 -0800 |
| commit | eba66c1eafeef6512259c9b46face2b03c7433b8 (patch) | |
| tree | 0945a1e684448ba37146dbd36cd71dc91d70dad2 /lisp/gnus/gnus-demon.el | |
| parent | 0613e7a38efc3b0534e0ca5c5fa401e2a3bda906 (diff) | |
| download | emacs-eba66c1eafeef6512259c9b46face2b03c7433b8.tar.gz | |
Remove some timestamp format assumptions
Don’t assume that current-time and plain encode-time return
timestamps in (HI LO US PS) format.
* lisp/gnus/gnus-art.el (article-make-date-line)
(article-lapsed-string):
* lisp/gnus/gnus-demon.el (gnus-demon-time-to-step):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
* lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
* lisp/net/pop3.el (pop3-uidl-dele):
* lisp/org/ox-publish.el (org-publish-sitemap):
* lisp/vc/vc-hg.el (vc-hg-state-fast):
Simplify and remove assumptions about timestamp format.
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
Do not worry about time-subtract returning nil; that's not possible.
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
Avoid race due to duplicate current-time calls.
* lisp/vc/vc-hg.el (vc-hg--time-to-integer): Remove; no longer used.
Diffstat (limited to 'lisp/gnus/gnus-demon.el')
| -rw-r--r-- | lisp/gnus/gnus-demon.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el index 4ae4c65d835..b9cb8eb71ce 100644 --- a/lisp/gnus/gnus-demon.el +++ b/lisp/gnus/gnus-demon.el @@ -192,11 +192,9 @@ marked with SPECIAL." (elt nowParts 6) (elt nowParts 7) (elt nowParts 8))) - ;; calculate number of seconds between NOW and THEN - (diff (+ (* 65536 (- (car then) (car now))) - (- (cadr then) (cadr now))))) - ;; return number of timesteps in the number of seconds - (round (/ diff gnus-demon-timestep)))) + (diff (float-time (time-subtract then now)))) + ;; Return number of timesteps in the number of seconds. + (round diff gnus-demon-timestep))) (gnus-add-shutdown 'gnus-demon-cancel 'gnus) |
