Skip to content

Commit

Permalink
fix remove Duration.Round to compatible with version less than go1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
chyroc committed Oct 31, 2017
1 parent 6ed0369 commit 0d2642a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion progressbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (p *ProgressBar) Show() error {
strings.Repeat(p.symbolFinished, p.currentSaucerSize),
strings.Repeat(p.symbolLeft, p.size-p.currentSaucerSize),
p.rightBookend,
time.Since(p.startTime).Round(time.Second).String(),
(time.Duration(time.Since(p.startTime).Seconds()) * time.Second).String(),
(time.Duration(secondsLeft) * time.Second).String(),
)

Expand Down

0 comments on commit 0d2642a

Please sign in to comment.