[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a21b8c5 12/13: Fix minor clock skew issues
From: |
Paul Eggert |
Subject: |
master a21b8c5 12/13: Fix minor clock skew issues |
Date: |
Mon, 6 Dec 2021 02:24:23 -0500 (EST) |
branch: master
commit a21b8c5d7dfb3808cf18a5ac118e25940c9b5518
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Fix minor clock skew issues
* lisp/midnight.el (clean-buffer-list):
* lisp/progmodes/vhdl-mode.el (vhdl-template-replace-header-keywords):
* lisp/net/rcirc.el (rcirc-connect):
Don’t assume that getting the current time twice in rapid
succession will yield the same date and time.
---
lisp/midnight.el | 2 +-
lisp/net/rcirc.el | 2 +-
lisp/progmodes/vhdl-mode.el | 5 +++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/midnight.el b/lisp/midnight.el
index b3adbf0..51173e7 100644
--- a/lisp/midnight.el
+++ b/lisp/midnight.el
@@ -159,7 +159,7 @@ the current date/time, buffer name, how many seconds ago it
was
displayed (can be nil if the buffer was never displayed) and its
lifetime, i.e., its \"age\" when it will be purged."
(interactive)
- (let ((tm (current-time)) bts (ts (format-time-string "%Y-%m-%d %T"))
+ (let* ((tm (current-time)) bts (ts (format-time-string "%Y-%m-%d %T" tm))
delay cbld bn)
(dolist (buf (buffer-list))
(when (buffer-live-p buf)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index b4e9031..2375b14 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -716,8 +716,8 @@ that are joined after authentication."
(setq rcirc-nick-table (make-hash-table :test 'equal))
(setq rcirc-nick nick)
(setq rcirc-startup-channels startup-channels)
- (setq rcirc-last-server-message-time (current-time))
(setq rcirc-last-connect-time (current-time))
+ (setq rcirc-last-server-message-time rcirc-last-connect-time)
;; Check if the immediate process state
(sit-for .1)
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 3a9185b..f3a7d96 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -10683,8 +10683,9 @@ Include a library specification, if not already there."
(replace-match "" t t)
(vhdl-template-insert-date))
(goto-char beg)
- (while (search-forward "<year>" end t)
- (replace-match (format-time-string "%Y" nil) t t))
+ (let ((year (format-time-string "%Y")))
+ (while (search-forward "<year>" end t)
+ (replace-match year t t)))
(goto-char beg)
(when file-title
(while (search-forward "<title string>" end t)
- master dbef214 10/13: Simplify by using format-time-string, (continued)
- master dbef214 10/13: Simplify by using format-time-string, Paul Eggert, 2021/12/06
- master 83fa35b 02/13: Use time-equal-p to compare timestamps in tests, Paul Eggert, 2021/12/06
- master 524c42f 04/13: Prefer nil to (current-time) when either will do, Paul Eggert, 2021/12/06
- master 19932c3 11/13: Avoid timestamp info loss in mh-alias-tstamp, Paul Eggert, 2021/12/06
- master 2bda029 07/13: Use time-convert in with-decoded-time-value, Paul Eggert, 2021/12/06
- master 15f20c0 09/13: Simplify RFC 5322 time zone generation, Paul Eggert, 2021/12/06
- master f4d7ca7 05/13: Simplify message-unique-id etc., Paul Eggert, 2021/12/06
- master 1866373 08/13: Fix image load timekeeping bug, Paul Eggert, 2021/12/06
- master af60618 03/13: Simplify cedet-utest-elapsed-time, Paul Eggert, 2021/12/06
- master 0d88c3c 01/13: Add time-convert tests, Paul Eggert, 2021/12/06
- master a21b8c5 12/13: Fix minor clock skew issues,
Paul Eggert <=