summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/timer.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-03 23:23:54 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-03 23:23:54 -0700
commitf34755dce2262f4f7e9d692fe985f03051519cb4 (patch)
tree927f6ac5792cab95e57a7d2232a554b19c0738fb /lisp/emacs-lisp/timer.el
parent3ca74e5368a1022e332a0601d9be2418dbe8c083 (diff)
downloademacs-f34755dce2262f4f7e9d692fe985f03051519cb4.tar.gz
* emacs-lisp/timer.el (timer-until): Use time-subtract and float-time.
Diffstat (limited to 'lisp/emacs-lisp/timer.el')
-rw-r--r--lisp/emacs-lisp/timer.el5
1 files changed, 1 insertions, 4 deletions
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.