emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/buttercup dbcd3d4 256/340: Calculate total test run time w


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup dbcd3d4 256/340: Calculate total test run time with current-time
Date: Thu, 16 Dec 2021 14:59:46 -0500 (EST)

branch: elpa/buttercup
commit dbcd3d454548966a1ad6d89b9ed3189c31c04d18
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>

    Calculate total test run time with current-time
    
    ... instead of float-time. current-time is more exact.
---
 buttercup.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/buttercup.el b/buttercup.el
index d4ec9bf..d8a2955 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -1551,7 +1551,7 @@ EVENT and ARG are described in `buttercup-reporter'."
         (print-escape-nonascii t))
     (pcase event
       (`buttercup-started
-       (setq buttercup-reporter-batch--start-time (float-time)
+       (setq buttercup-reporter-batch--start-time (current-time)
              buttercup-reporter-batch--failures nil)
        (let ((defined (buttercup-suites-total-specs-defined arg))
              (pending (buttercup-suites-total-specs-pending arg)))
@@ -1617,8 +1617,9 @@ EVENT and ARG are described in `buttercup-reporter'."
        (let ((defined (buttercup-suites-total-specs-defined arg))
              (pending (buttercup-suites-total-specs-pending arg))
              (failed (buttercup-suites-total-specs-failed arg))
-             (duration (- (float-time)
-                          buttercup-reporter-batch--start-time)))
+             (duration (float-time (time-subtract
+                                    (current-time)
+                                    buttercup-reporter-batch--start-time))))
          (if (> pending 0)
              (buttercup--print
               "Ran %s out of %s specs, %s failed, in %.1f seconds.\n"
@@ -1694,8 +1695,8 @@ EVENT and ARG are described in `buttercup-reporter'."
      (let ((defined (buttercup-suites-total-specs-defined arg))
            (pending (buttercup-suites-total-specs-pending arg))
            (failed (buttercup-suites-total-specs-failed arg))
-           (duration (- (float-time)
-                        buttercup-reporter-batch--start-time)))
+           (duration (float-time (time-subtract (current-time)
+                                                
buttercup-reporter-batch--start-time))))
        (if (> pending 0)
            (buttercup--print
             (concat



reply via email to

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