From f34755dce2262f4f7e9d692fe985f03051519cb4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 3 Jul 2011 23:23:54 -0700 Subject: [PATCH] * emacs-lisp/timer.el (timer-until): Use time-subtract and float-time. --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/timer.el | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 93cf3c44033..db19df15619 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-07-04 Paul Eggert + + * emacs-lisp/timer.el (timer-until): Use time-subtract and float-time. + 2011-07-04 Juanma Barranquero * type-break.el (timep): Use the value of `float-time' to avoid a diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 27fd79a6ad2..e5d21c35100 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -258,10 +258,7 @@ how many will really happen.") "Calculate number of seconds from when TIMER will run, until TIME. TIMER is a timer, and stands for the time when its next repeat is scheduled. TIME is a time-list." - ;; FIXME: (float-time (time-subtract (timer--time timer) time)) - (let ((high (- (car time) (timer--high-seconds timer))) - (low (- (nth 1 time) (timer--low-seconds timer)))) - (+ low (* high 65536)))) + (float-time (time-subtract time (timer--time timer)))) (defun timer-event-handler (timer) "Call the handler for the timer TIMER. -- 2.39.2