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

Scheduling/threading/timing functions for plugins #15

Open
theepicsnail opened this issue Nov 4, 2013 · 0 comments
Open

Scheduling/threading/timing functions for plugins #15

theepicsnail opened this issue Nov 4, 2013 · 0 comments

Comments

@theepicsnail
Copy link
Owner

There should be an easier way to schedule callbacks for future execution. In javascript the setInterval and setTimeout functions return an ID that can be used to cancel pending events. There's also just a simple function for scheduling events. This would be much more referred than needing to directly use the python threading.Timer class.

A few methods that should be provided

After(timeout, callback) => eventId
Call the callback after timeout seconds

Every(timeout, callback) => eventId
Same as after, except another call is scheduled when the callback is fired

Cancel(eventId)
Used to stop a pending event.

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

No branches or pull requests

1 participant