Write a run's elapsed time once, in the duration formatter's units
The runs table drew when a run started and how long it took in two
notations ('56m ago | 55.5 min'), and for a run still going those are the
same reading twice. `dur` now steps past the minute into hours and days,
the ago reading is derived from it, and a running run writes only the
elapsed one.
This commit is contained in:
@@ -38,6 +38,8 @@ assert.equal(dur(0), "0 ms")
|
||||
assert.equal(dur(203.63), "204 ms")
|
||||
assert.equal(dur(1240), "1.24 s")
|
||||
assert.equal(dur(90_000), "1.5 min")
|
||||
assert.equal(dur(12_600_000), "3.5 h")
|
||||
assert.equal(dur(259_200_000), "3 d")
|
||||
|
||||
// The plain window down to 0.01 ms, so a fast run keeps one unit across polls.
|
||||
assert.equal(dur(0.4), "0.4 ms")
|
||||
|
||||
Reference in New Issue
Block a user