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

add an alias for setTimeout and setInterval #84

Open
rzimmerman opened this issue Aug 20, 2013 · 2 comments
Open

add an alias for setTimeout and setInterval #84

rzimmerman opened this issue Aug 20, 2013 · 2 comments
Labels
Milestone

Comments

@rzimmerman
Copy link
Owner

It would be cool if setInterval worked kind of like a while loop with a conditional.

setTimeout could be something like delay for

@cmwelsh
Copy link

cmwelsh commented Aug 22, 2013

I've heard people recommend against setInterval (see the section about stacking calls at JavaScript Garden. Perhaps you could emulate it with setTimeout.

@rzimmerman
Copy link
Owner Author

Thanks for the link on setInterval. That makes a lot of sense - we wouldn't want calls to the timer function to queue up while blocked. Something more like NSTimer where more than one call gets dropped would be better. Or just do what the article says and keep calling setTimeout in some intelligent way.

rzimmerman added a commit that referenced this issue Aug 28, 2013
sometimes the tests failed if the timer took too long to complete
this could happen under high CPU load if you were unlucky
gh-84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants