Skip to content

Commit

Permalink
simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Jan 2, 2018
1 parent e7b7bf0 commit 63f859d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ func NewTicker(ctx context.Context, counter Counter, size int64, d time.Duration
started = time.Now()
}
} else {
now := time.Now()
ratio := progress.n / progress.size
past := float64(now.Sub(started))
past := float64(time.Now().Sub(started))
future := time.Duration(past / ratio)
progress.estimated = started.Add(future)
}
Expand Down

0 comments on commit 63f859d

Please sign in to comment.