Adds a new callback that will be executed as time permits on the main thread.
This is useful when you need to do a lot of background work but want to do it incrementally.
callback
will be provided a deadline that it should complete it's work by (or near) and can be checked using [
[email protected]_monotonic_time] for comparison.
Use [func@scheduler_remove] to remove the handler.
callback |
the callback to execute |
notify |
closure notify for |
user_data |
user data for |