diff options
| author | Paul Eggert | 2011-07-03 23:23:54 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-03 23:23:54 -0700 |
| commit | f34755dce2262f4f7e9d692fe985f03051519cb4 (patch) | |
| tree | 927f6ac5792cab95e57a7d2232a554b19c0738fb | |
| parent | 3ca74e5368a1022e332a0601d9be2418dbe8c083 (diff) | |
| download | emacs-f34755dce2262f4f7e9d692fe985f03051519cb4.tar.gz emacs-f34755dce2262f4f7e9d692fe985f03051519cb4.zip | |
* emacs-lisp/timer.el (timer-until): Use time-subtract and float-time.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2011-07-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * emacs-lisp/timer.el (timer-until): Use time-subtract and float-time. | ||
| 4 | |||
| 1 | 2011-07-04 Juanma Barranquero <lekktu@gmail.com> | 5 | 2011-07-04 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 6 | ||
| 3 | * type-break.el (timep): Use the value of `float-time' to avoid a | 7 | * 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.") | |||
| 258 | "Calculate number of seconds from when TIMER will run, until TIME. | 258 | "Calculate number of seconds from when TIMER will run, until TIME. |
| 259 | TIMER is a timer, and stands for the time when its next repeat is scheduled. | 259 | TIMER is a timer, and stands for the time when its next repeat is scheduled. |
| 260 | TIME is a time-list." | 260 | TIME is a time-list." |
| 261 | ;; FIXME: (float-time (time-subtract (timer--time timer) time)) | 261 | (float-time (time-subtract time (timer--time timer)))) |
| 262 | (let ((high (- (car time) (timer--high-seconds timer))) | ||
| 263 | (low (- (nth 1 time) (timer--low-seconds timer)))) | ||
| 264 | (+ low (* high 65536)))) | ||
| 265 | 262 | ||
| 266 | (defun timer-event-handler (timer) | 263 | (defun timer-event-handler (timer) |
| 267 | "Call the handler for the timer TIMER. | 264 | "Call the handler for the timer TIMER. |