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

Set timer.active = false before calling end_fn #4

Merged
merged 1 commit into from Aug 25, 2016

Conversation

pitou
Copy link
Contributor

@pitou pitou commented Aug 11, 2016

Hi, I was thinking that maybe setting a timer as inactive before calling end_fn could be more useful; in my case I was calling restart_timer (with start_paused === false) inside end_fn but the timer was not actually restarted because timer.active was being re-setted to false immediately after the callback call. Thank you.

Hi, I was thinking that maybe setting a timer as inactive before calling `end_fn` could be more useful; in my case I was calling `restart_timer` (with `start_paused` === false) inside `end_fn` but the timer was not actually restarted because `timer.active` was being re-setted to false immediately after the callback call. Thank you.
@clowerweb clowerweb merged commit 7a0d65a into clowerweb:master Aug 25, 2016
@pitou pitou deleted the patch-1 branch August 25, 2016 20:35
@benwiley4000
Copy link
Contributor

@poetcyborg Sounds good to me! I had originally placed that line after the function call because the logic in my head said that the timer isn't "inactive" until the final callback is invoked. But really, your approach makes more sense and I hadn't considered cases where the end callback would restart the timer.

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