[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1866373 08/13: Fix image load timekeeping bug

From: Paul Eggert
Subject: master 1866373 08/13: Fix image load timekeeping bug
Date: Mon, 6 Dec 2021 02:24:22 -0500 (EST)

branch: master
commit 186637314dfa287b4b8178b668de92ecb57fdf1a
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Fix image load timekeeping bug
    * 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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/image.el b/lisp/image.el
index 87fab80..cedefc0 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -953,9 +953,9 @@ for the animation speed.  A negative value means to animate 
in reverse."
                     (message "Stopping animation; animation possibly too big")
-      (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))
               (/ (or (cdr (plist-get (cdr image) :animate-multi-frame-data))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]