]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix image load timekeeping bug
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Dec 2021 03:30:27 +0000 (19:30 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Dec 2021 07:24:09 +0000 (23:24 -0800)
* lisp/image.el (image-animate-timeout): Fix bug that caused the
local variable time-to-load-image to be practically zero, instead
of the time it actually took to load the image.  I think
this bug was introduced in 2013-02-16T03:29:30Z!rgm@gnu.org.

lisp/image.el

index 87fab80aad8b6f7612c500c3cfbbbab61e08decd..cedefc038f0a8d62acbcba4fe1579b1c771c9a50 100644 (file)
@@ -953,9 +953,9 @@ for the animation speed.  A negative value means to animate in reverse."
                   (progn
                     (message "Stopping animation; animation possibly too big")
                     nil)))
-      (image-show-frame image n t)
-      (let* ((speed (image-animate-get-speed image))
-            (time (current-time))
+      (let* ((time (prog1 (current-time)
+                    (image-show-frame image n t)))
+            (speed (image-animate-get-speed image))
             (time-to-load-image (time-since time))
             (stated-delay-time
               (/ (or (cdr (plist-get (cdr image) :animate-multi-frame-data))