]> git.eshelyaron.com Git - emacs.git/commit
Improve rounding in recent timer fix
authorPaul Eggert <eggert@Penguin.CS.UCLA.EDU>
Tue, 23 Oct 2018 02:31:15 +0000 (19:31 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 Oct 2018 02:34:49 +0000 (19:34 -0700)
commita38128561757c82fbd088cba379b7a253558c7f1
tree3583478b760707dca52441fef3a19dfc1e954baf
parent8602bd855904acc1966f1a94a008f91bb3f88c18
Improve rounding in recent timer fix

* lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Use more-precise arithmetic to handle some boundary cases better
when rounding errors occur (Bug#33071).
* test/lisp/emacs-lisp/timer-tests.el:
(timer-next-integral-multiple-of-time-3):
New test, to test one of the boundary cases.
(timer-next-integral-multiple-of-time-2):
Redo so as to not assume a particular way of rounding 0.01.
lisp/emacs-lisp/timer.el
test/lisp/emacs-lisp/timer-tests.el