From: Paul Eggert Date: Mon, 4 Jul 2011 06:23:54 +0000 (-0700) Subject: * emacs-lisp/timer.el (timer-until): Use time-subtract and float-time. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~205^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f34755dce2262f4f7e9d692fe985f03051519cb4;p=emacs.git * emacs-lisp/timer.el (timer-until): Use time-subtract and float-time. --- 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.