summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2016-02-07 21:29:38 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2016-02-07 21:29:38 +0000
commitc651ba8711b23725052bfc6b572cbf4e83449893 (patch)
tree3e9dd7087c483036d99ea29b546d83e88dae1185
parent117b8238bd9175f2af88347b1a516b38c9d4adce (diff)
Allow floating-point delays
-rw-r--r--spinner.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/spinner.el b/spinner.el
index df59e10..0a0dd50 100644
--- a/spinner.el
+++ b/spinner.el
@@ -255,8 +255,8 @@ stop the SPINNER's timer."
(unless (ignore-errors (> (spinner--fps spinner) 0))
(error "A spinner's FPS must be a positive number"))
- (setf (spinner--counter spinner) (- (* (or (spinner--delay spinner) 0)
- (spinner--fps spinner))))
+ (setf (spinner--counter spinner) (round (- (* (or (spinner--delay spinner) 0)
+ (spinner--fps spinner)))))
;; Create timer.
(let* ((repeat (/ 1.0 (spinner--fps spinner)))
(time (timer-next-integral-multiple-of-time (current-time) repeat))