diff options
Diffstat (limited to 'lisp/erc/erc.el')
-rw-r--r-- | lisp/erc/erc.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index c70dfb94d7e..9363d4a8262 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -5956,17 +5956,15 @@ Returns a list of the form (HIGH LOW), compatible with Emacs time format." (list (truncate (/ n 65536)) (truncate (mod n 65536))))) -(defun erc-emacs-time-to-erc-time (time) - "Convert Emacs TIME to a number of seconds since the epoch." - (when time - (+ (* (nth 0 time) 65536.0) (nth 1 time)))) -; (round (+ (* (nth 0 tm) 65536.0) (nth 1 tm)))) +(defalias 'erc-emacs-time-to-erc-time + (if (featurep 'xemacs) 'time-to-seconds 'float-time) + "Convert time value TIME to a floating point number. +TIME defaults to the current time.") -(defun erc-current-time () +(defalias 'erc-current-time 'erc-emacs-time-to-erc-time "Return the `current-time' as a number of seconds since the epoch. -See also `erc-emacs-time-to-erc-time'." - (erc-emacs-time-to-erc-time (current-time))) +See also `erc-emacs-time-to-erc-time'.") (defun erc-time-diff (t1 t2) "Return the time difference in seconds between T1 and T2." |