* emacs-lisp/timer.el (timer-until): Use time-subtract and float-time.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Jul 2011 06:23:54 +0000 (23:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Jul 2011 06:23:54 +0000 (23:23 -0700)
lisp/ChangeLog
lisp/emacs-lisp/timer.el

index 93cf3c4..db19df1 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * emacs-lisp/timer.el (timer-until): Use time-subtract and float-time.
+
 2011-07-04  Juanma Barranquero  <lekktu@gmail.com>
 
        * type-break.el (timep): Use the value of `float-time' to avoid a
index 27fd79a..e5d21c3 100644 (file)
@@ -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.