这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@thcyron
Copy link

@thcyron thcyron commented Dec 18, 2017

Currently, the variables needed to show time elapsed are only set when using Incr(). This PR makes it also work when using Set().

@feliixx
Copy link

feliixx commented May 4, 2018

Hi @gosuri

Thanks for this project, it's really awesome ! Is there any reasons for not merging this PR? Looks like it would fix #34

Thanks in advance,

feliixx

dot-deamon added a commit to dot-deamon/uiprogress that referenced this pull request Nov 29, 2019
dot-deamon added a commit to dot-deamon/uiprogress that referenced this pull request Nov 29, 2019
dot-deamon added a commit to dot-deamon/uiprogress that referenced this pull request Nov 29, 2019
Comment on lines +98 to +100
if b.TimeStarted.IsZero() {
b.TimeStarted = time.Now()
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you consider the alternative of using implementing Incr() by reusing Set()? This would result in more reused code and less code overall, less opportunity for error.

Ideally there would be a test as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants