瀏覽代碼

[stress] Fixes seconds display for subsecond results

Ask Solem 9 年之前
父節點
當前提交
60e4bfcfe4
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      funtests/stress/stress/suite.py

+ 4 - 2
funtests/stress/stress/suite.py

@@ -60,10 +60,12 @@ class StopSuite(Exception):
 
 
 def pstatus(p):
+    runtime = monotonic() - p.runtime
+    elapsed = monotonic() - p.elapsed
     return F_PROGRESS.format(
         p,
-        runtime=humanize_seconds(monotonic() - p.runtime, now='0 seconds'),
-        elapsed=humanize_seconds(monotonic() - p.elapsed, now='0 seconds'),
+        runtime=humanize_seconds(runtime, now=runtime),
+        elapsed=humanize_seconds(elapsed, now=elapsed),
     )