]> git.eshelyaron.com Git - emacs.git/commit
Avoid some double-rounding of Lisp timestamps
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Feb 2019 02:32:31 +0000 (18:32 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Feb 2019 02:33:57 +0000 (18:33 -0800)
commit476066e89d6f0bb87220da690b8a476bf9655b80
tree5b79293c40ba0f54544d803a02fbec7310f04a0e
parenteba66c1eafeef6512259c9b46face2b03c7433b8
Avoid some double-rounding of Lisp timestamps

Also, simplify some time-related Lisp timestamp code
while we’re in the neighborhood.
* lisp/battery.el (battery-linux-proc-acpi)
(battery-linux-sysfs, battery-upower, battery-bsd-apm):
* lisp/calendar/timeclock.el (timeclock-seconds-to-string)
(timeclock-log, timeclock-last-period)
(timeclock-entry-length, timeclock-entry-list-span)
(timeclock-find-discrep, timeclock-generate-report):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/completion.el (cmpl-hours-since-origin):
* lisp/ecomplete.el (ecomplete-decay-1):
* lisp/emacs-lisp/ert.el (ert--results-update-stats-display)
(ert--results-update-stats-display-maybe):
* lisp/emacs-lisp/timer-list.el (list-timers):
* lisp/emacs-lisp/timer.el (timer-until)
(timer-event-handler):
* lisp/erc/erc-backend.el (erc-server-send-ping)
(erc-server-send-queue, erc-handle-parsed-server-response)
(erc-handle-unknown-server-response):
* lisp/erc/erc-track.el (erc-buffer-visible):
* lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p)
(erc-cmd-PING, erc-send-current-line):
* lisp/eshell/em-pred.el (eshell-pred-file-time):
* lisp/eshell/em-unix.el (eshell-show-elapsed-time):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event:org-timestamp):
* lisp/gnus/gnus-int.el (gnus-backend-trace):
* lisp/gnus/gnus-sum.el (gnus-user-date):
* lisp/gnus/mail-source.el (mail-source-delete-crash-box):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/ibuf-ext.el (ibuffer-mark-old-buffers):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/mouse.el (mouse--down-1-maybe-follows-link)
(mouse--click-1-maybe-follows-link):
* lisp/mpc.el (mpc--faster-toggle):
* lisp/net/rcirc.el (rcirc-handler-ctcp-KEEPALIVE)
(rcirc-sentinel):
* lisp/net/tramp-cache.el (tramp-get-file-property):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-newer-than-file-p)
(tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
* lisp/org/org-clock.el (org-clock-resolve):
(org-resolve-clocks, org-clock-in, org-clock-out, org-clock-sum):
* lisp/org/org-timer.el (org-timer-start)
(org-timer-pause-or-continue, org-timer-seconds):
* lisp/org/org.el (org-evaluate-time-range):
* lisp/org/ox-publish.el (org-publish-cache-ctime-of-src):
* lisp/pixel-scroll.el (pixel-scroll-in-rush-p):
* lisp/play/hanoi.el (hanoi-move-ring):
* lisp/proced.el (proced-format-time):
* lisp/progmodes/cpp.el (cpp-progress-message):
* lisp/progmodes/flymake.el (flymake--handle-report):
* lisp/progmodes/js.el (js--wait-for-matching-output):
* lisp/subr.el (progress-reporter-do-update):
* lisp/term/xterm.el (xterm--read-event-for-query):
* lisp/time.el (display-time-update, emacs-uptime):
* lisp/tooltip.el (tooltip-delay):
* lisp/url/url-cookie.el (url-cookie-parse-file-netscape):
* lisp/url/url-queue.el (url-queue-prune-old-entries):
* lisp/url/url.el (url-retrieve-synchronously):
* lisp/xt-mouse.el (xterm-mouse-event):
Avoid double-rounding of time-related values.  Simplify.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
When hoping for the best (unlikely), use a better decoded time.
(icalendar--convert-sexp-to-ical): Avoid unnecessary encode-time.
* lisp/calendar/timeclock.el (timeclock-when-to-leave):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/desktop.el (desktop-create-buffer):
* lisp/emacs-lisp/benchmark.el (benchmark-elapse):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/nnmail.el (nnmail-expired-article-p):
* lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
* lisp/nxml/rng-maint.el (rng-time-function):
* lisp/org/org-clock.el (org-clock-get-clocked-time)
(org-clock-resolve, org-resolve-clocks, org-resolve-clocks-if-idle):
* lisp/org/org-habit.el (org-habit-insert-consistency-graphs):
* lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info)
(vhdl-fix-case-region-1):
Use time-since instead of open-coding most of it.
* lisp/erc/erc-dcc.el (erc-dcc-get-sentinel):
* lisp/erc/erc.el (erc-string-to-emacs-time, erc-time-gt):
Now obsolete.  All uses changed.
(erc-time-diff): Accept all Lisp time values.
All uses changed.
* lisp/gnus/gnus-demon.el (gnus-demon-idle-since):
* lisp/gnus/gnus-score.el (gnus-score-headers):
* lisp/gnus/nneething.el (nneething-make-head):
* lisp/gnus/nnheader.el (nnheader-message-maybe):
* lisp/gnus/nnimap.el (nnimap-keepalive):
* lisp/image.el (image-animate-timeout):
* lisp/mail/feedmail.el (feedmail-rfc822-date):
* lisp/net/imap.el (imap-wait-for-tag):
* lisp/net/newst-backend.el (newsticker--image-get):
* lisp/net/rcirc.el (rcirc-handler-317, rcirc-handler-333):
* lisp/obsolete/xesam.el (xesam-refresh-entry):
* lisp/org/org-agenda.el (org-agenda-show-clocking-issues)
(org-agenda-check-clock-gap, org-agenda-to-appt):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org-clock.el (org-clock-resolve-clock)
(org-clocktable-steps):
* lisp/org/org-colview.el (org-columns-edit-value)
(org-columns, org-agenda-columns):
* lisp/org/org-duration.el (org-duration-from-minutes):
* lisp/org/org-element.el (org-element-cache-sync-duration)
(org-element-cache-sync-break)
(org-element--cache-interrupt-p, org-element--cache-sync):
* lisp/org/org-habit.el (org-habit-get-faces)
* lisp/org/org-indent.el (org-indent-add-properties):
* lisp/org/org-table.el (org-table-sum):
* lisp/org/org-timer.el (org-timer-show-remaining-time)
(org-timer-set-timer):
* lisp/org/org.el (org-babel-load-file, org-today)
(org-auto-repeat-maybe, org-2ft, org-time-stamp)
(org-read-date-analyze, org-time-stamp-to-now)
(org-small-year-to-year, org-goto-calendar):
* lisp/org/ox.el (org-export-insert-default-template):
* lisp/ses.el (ses--time-check):
* lisp/type-break.el (type-break-time-warning)
(type-break-statistics, type-break-demo-boring):
* lisp/url/url-cache.el (url-cache-expired)
(url-cache-prune-cache):
* lisp/vc/vc-git.el (vc-git-stash-snapshot):
* lisp/erc/erc-match.el (erc-log-matches-come-back):
Simplify.
78 files changed:
lisp/battery.el
lisp/calendar/cal-dst.el
lisp/calendar/icalendar.el
lisp/calendar/timeclock.el
lisp/cedet/ede/detect.el
lisp/completion.el
lisp/desktop.el
lisp/ecomplete.el
lisp/emacs-lisp/benchmark.el
lisp/emacs-lisp/ert.el
lisp/emacs-lisp/timer-list.el
lisp/emacs-lisp/timer.el
lisp/erc/erc-backend.el
lisp/erc/erc-dcc.el
lisp/erc/erc-match.el
lisp/erc/erc-track.el
lisp/erc/erc.el
lisp/eshell/em-pred.el
lisp/eshell/em-unix.el
lisp/gnus/gnus-art.el
lisp/gnus/gnus-demon.el
lisp/gnus/gnus-group.el
lisp/gnus/gnus-icalendar.el
lisp/gnus/gnus-int.el
lisp/gnus/gnus-score.el
lisp/gnus/gnus-sum.el
lisp/gnus/mail-source.el
lisp/gnus/nneething.el
lisp/gnus/nnheader.el
lisp/gnus/nnimap.el
lisp/gnus/nnmail.el
lisp/gnus/nnmaildir.el
lisp/ibuf-ext.el
lisp/image.el
lisp/mail/feedmail.el
lisp/mouse.el
lisp/mpc.el
lisp/net/imap.el
lisp/net/newst-backend.el
lisp/net/rcirc.el
lisp/net/tramp-cache.el
lisp/net/tramp-sh.el
lisp/net/tramp-smb.el
lisp/nxml/rng-maint.el
lisp/obsolete/xesam.el
lisp/org/org-agenda.el
lisp/org/org-capture.el
lisp/org/org-clock.el
lisp/org/org-colview.el
lisp/org/org-duration.el
lisp/org/org-element.el
lisp/org/org-habit.el
lisp/org/org-indent.el
lisp/org/org-table.el
lisp/org/org-timer.el
lisp/org/org.el
lisp/org/ox-publish.el
lisp/org/ox.el
lisp/pixel-scroll.el
lisp/play/hanoi.el
lisp/proced.el
lisp/progmodes/cpp.el
lisp/progmodes/flymake.el
lisp/progmodes/js.el
lisp/progmodes/vhdl-mode.el
lisp/ses.el
lisp/subr.el
lisp/term/xterm.el
lisp/time.el
lisp/tooltip.el
lisp/type-break.el
lisp/url/url-cache.el
lisp/url/url-cookie.el
lisp/url/url-queue.el
lisp/url/url.el
lisp/vc/vc-git.el
lisp/woman.el
lisp/xt-mouse.el