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

Pause timer periodic? #19

Closed
razein97 opened this issue Dec 31, 2020 · 7 comments
Closed

Pause timer periodic? #19

razein97 opened this issue Dec 31, 2020 · 7 comments

Comments

@razein97
Copy link

razein97 commented Dec 31, 2020

EDIT: See #45 for an example on how to implement this.

Declaring and using the timer in init state does not work like timer.periodic.

@razein97 razein97 reopened this Dec 31, 2020
@razein97 razein97 changed the title Pausable timer does not work in init state. Pause timer periodic? Dec 31, 2020
@llucax
Copy link
Owner

llucax commented Dec 31, 2020

Hi @razein97, I really don't understand what's not working or what is not working as you expect. Can you provide more information? Ideally a minimal example to reproduce the issue?

Thanks!

@razein97
Copy link
Author

I think it's my bad.
I came across this when I was searching for how to pause timer.periodic()
Does this have the same functionality...run a function every x duration.
Thanks.

@llucax
Copy link
Owner

llucax commented Dec 31, 2020

There is no built-in implementation of PausableTimer.periodic(), but you can build one with it, there is even an example in the README. If there is enough requests to have it built-in, I might add it.

Shall I close the issue then?

@razein97
Copy link
Author

Yes. Thank you!

@tricaricom
Copy link

The example in the README is not periodic. I think you should add a periodic() constructor like Timer.periodic().

@llucax
Copy link
Owner

llucax commented Mar 10, 2022

I will create a new issue for this, as it is the second time it comes around. Next time feel free to create an issue yourself (or even better, submit a pull request :)

#45.

@llucax
Copy link
Owner

llucax commented Mar 10, 2022

I'll lock this issue as it was a question. Feel free to ask any questions in the discussions.

Repository owner locked as off-topic and limited conversation to collaborators Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants