branch: elpa/buttercup commit dbcd3d454548966a1ad6d89b9ed3189c31c04d18 Author: Ola Nilsson <ola.nils...@gmail.com> Commit: Ola Nilsson <ola.nils...@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