*** lisp/calendar/time-date.el~ 2009-09-02 21:50:25 +0000 --- lisp/calendar/time-date.el 2009-09-07 11:55:15 +0000 *************** *** 114,130 **** ;; Bit of a mess. Emacs has float-time since at least 21.1. ;; This file is synced to Gnus, and XEmacs packages may have been written ;; using time-to-seconds from the Gnus library. ! ;;;###autoload(if (featurep 'xemacs) ! ;;;###autoload (autoload 'time-to-seconds "time-date") ! ;;;###autoload (define-obsolete-function-alias 'time-to-seconds 'float-time "21.1")) ! ! (if (featurep 'xemacs) ! (defun time-to-seconds (time) ! "Convert time value TIME to a floating point number." ! (with-decoded-time-value ((high low micro time)) ! (+ (* 1.0 high 65536) ! low ! (/ micro 1000000.0))))) ;;;###autoload (defun seconds-to-time (seconds) --- 114,132 ---- ;; Bit of a mess. Emacs has float-time since at least 21.1. ;; This file is synced to Gnus, and XEmacs packages may have been written ;; using time-to-seconds from the Gnus library. ! ;;;###autoload(if (fboundp 'float-time) ! ;;;###autoload (progn ! ;;;###autoload (defalias 'time-to-seconds 'float-time) ! ;;;###autoload (make-obsolete 'time-to-seconds 'float-time "21.1")) ! ;;;###autoload (autoload 'time-to-seconds "time-date")) ! ! (unless (fboundp 'float-time) ! (defun time-to-seconds (time) ! "Convert time value TIME to a floating point number." ! (with-decoded-time-value ((high low micro time)) ! (+ (* 1.0 high 65536) ! low ! (/ micro 1000000.0))))) ;;;###autoload (defun seconds-to-time (seconds) *************** *** 251,259 **** (defun time-to-number-of-days (time) "Return the number of days represented by TIME. The number of days will be returned as a floating point number." ! (/ (if (featurep 'xemacs) ! (time-to-seconds time) ! (float-time time)) (* 60 60 24))) ;;;###autoload (defun safe-date-to-time (date) --- 253,262 ---- (defun time-to-number-of-days (time) "Return the number of days represented by TIME. The number of days will be returned as a floating point number." ! (/ (if (fboundp 'float-time) ! (float-time time) ! (time-to-seconds time)) ! (* 60 60 24))) ;;;###autoload (defun safe-date-to-time (date) *** lisp/gnus/ecomplete.el~ 2009-09-02 21:50:26 +0000 --- lisp/gnus/ecomplete.el 2009-09-07 11:55:15 +0000 *************** *** 56,64 **** (defun ecomplete-add-item (type key text) (let ((elems (assq type ecomplete-database)) (now (string-to-number ! (format "%.0f" (if (featurep 'xemacs) ! (time-to-seconds (current-time)) ! (float-time))))) entry) (unless elems (push (setq elems (list type)) ecomplete-database)) --- 56,64 ---- (defun ecomplete-add-item (type key text) (let ((elems (assq type ecomplete-database)) (now (string-to-number ! (format "%.0f" (if (fboundp 'float-time) ! (float-time) ! (time-to-seconds (current-time)))))) entry) (unless elems (push (setq elems (list type)) ecomplete-database)) *** lisp/gnus/gnus-util.el~ 2009-09-02 21:50:26 +0000 --- lisp/gnus/gnus-util.el 2009-09-07 11:55:15 +0000 *************** *** 285,296 **** (and (= (car fdate) (car date)) (> (nth 1 fdate) (nth 1 date)))))) ! (defun gnus-float-time (&optional time) ! "Convert time value TIME to a floating point number. TIME defaults to the current time." ! (if (featurep 'xemacs) ! (time-to-seconds (or time (current-time))) ! (float-time time))) ;;; Keymap macros. --- 285,296 ---- (and (= (car fdate) (car date)) (> (nth 1 fdate) (nth 1 date)))))) ! (if (fboundp 'float-time) ! (defalias 'gnus-float-time 'float-time) ! (defun gnus-float-time (&optional time) ! "Convert time value TIME to a floating point number. TIME defaults to the current time." ! (time-to-seconds (or time (current-time))))) ;;; Keymap macros.