diff options
author | Eli Zaretskii <eliz@gnu.org> | 2018-10-20 12:52:52 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-10-20 12:52:52 +0300 |
commit | efb214622a0f4e077c09e721d134552dfe76ef70 (patch) | |
tree | cd2394d5da30aded30a73c22b44b6e9512da96c2 /lisp/emacs-lisp | |
parent | d684f5d5bc33249038e779a4b2009fd0761f09d5 (diff) | |
download | emacs-efb214622a0f4e077c09e721d134552dfe76ef70.tar.gz emacs-efb214622a0f4e077c09e721d134552dfe76ef70.tar.bz2 emacs-efb214622a0f4e077c09e721d134552dfe76ef70.zip |
Fix 'timer-next-integral-multiple-of-time'
* lisp/emacs-lisp/timer.el
(timer-next-integral-multiple-of-time): Fix recent change for
fractional values of SECS. (Bug#33071)
* test/lisp/emacs-lisp/timer-tests.el
(timer-next-integral-multiple-of-time-2): New test.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/timer.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 927e640feaa..e140738d9f3 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -101,7 +101,7 @@ of SECS seconds since the epoch. SECS may be a fraction." time (encode-time time 1000000000000))) (hz (cdr ticks-hz)) - (s-ticks (* secs hz)) + (s-ticks (round (* secs hz))) (more-ticks (+ (car ticks-hz) s-ticks))) (encode-time (cons (- more-ticks (% more-ticks s-ticks)) hz)))) |