branch: elpa/sly
commit 19f4046decb9715907b8064807b9e97c87a278fa
Author: Paul Eggert <egg...@cs.ucla.edu>
Commit: João Távora <joaotav...@gmail.com>

    Simplify message timestamp formatting
    
    * lib/sly-tests.el (sly-wait-condition): Use format-time-string rather
    than formatting by hand.  This avoids relying on Emacs timestamp
    format, which is slated to change.
---
 lib/sly-tests.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/sly-tests.el b/lib/sly-tests.el
index af381e9..5167794 100644
--- a/lib/sly-tests.el
+++ b/lib/sly-tests.el
@@ -209,9 +209,8 @@ conditions (assertions)."
 (defun sly-wait-condition (name predicate timeout &optional cleanup)
   (let ((end (time-add (current-time) (seconds-to-time timeout))))
     (while (not (funcall predicate))
-      (let ((now (current-time)))
-        (sly-message "waiting for condition: %s [%s.%06d]" name
-                     (format-time-string "%H:%M:%S" now) (cl-third now)))
+      (sly-message "waiting for condition: %s [%s]" name
+                   (format-time-string "%H:%M:%S.%6N"))
       (cond ((time-less-p end (current-time))
              (unwind-protect
                  (error "Timeout waiting for condition: %S" name)

Reply via email to