Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make time elapsed work when using Set() #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

3 participants