Function: erc-compat--current-lisp-time

erc-compat--current-lisp-time is a macro defined in erc-compat.el.gz.

Signature

(erc-compat--current-lisp-time)

Documentation

Return current-time as a (TICKS . HZ) pair on 29+.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-compat.el.gz
;; We can't store (TICKS . HZ) style timestamps on 27 and 28 because
;; `time-less-p' and friends do
;;
;;   message("obsolete timestamp with cdr ...", ...)
;;   decode_lisp_time(_, WARN_OBSOLETE_TIMESTAMPS, ...)
;;   lisp_time_struct(...)
;;   time_cmp(...)
;;
;; which spams *Messages* (and stderr when running the test suite).
(defmacro erc-compat--current-lisp-time ()
  "Return `current-time' as a (TICKS . HZ) pair on 29+."
  (if (>= emacs-major-version 29)
      '(let (current-time-list) (current-time))
    '(current-time)))