Skip to content

Scheduling/threading/timing functions for plugins #15

@theepicsnail

Description

@theepicsnail

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions