Skip to content

Commit

Permalink
stop elapsed on abort
Browse files Browse the repository at this point in the history
fixes #142
  • Loading branch information
vbauerster committed Aug 16, 2024
1 parent 6bb1b4f commit 94e20b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decor/elapsed.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NewElapsed(style TimeStyle, start time.Time, wcc ...WC) Decorator {
var msg string
producer := chooseTimeProducer(style)
fn := func(s Statistics) string {
if !s.Completed {
if !s.Completed && !s.Aborted {
msg = producer(time.Since(start))
}
return msg
Expand Down

0 comments on commit 94e20b3

Please sign in to comment.