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

New API: Timer Callbacks #208

Closed
michaelrsweet opened this issue Jun 1, 2022 · 1 comment
Closed

New API: Timer Callbacks #208

michaelrsweet opened this issue Jun 1, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request priority-high
Milestone

Comments

@michaelrsweet
Copy link
Owner

It would be useful to have a way to make the system object periodically call an application function. This same functionality could also be used to schedule periodic tasks that are currently hardcoded in the papplSystemRun function.

bool (*pappl_timer_cb_t)(pappl_system_t *system, void *timer_data);

bool papplSystemAddTimerCallback(pappl_system_t *system, time_t start, double interval, pappl_timer_cb_t timer_cb, void *timer_data);

The timer callback returns true to repeat or false to stop. If "start_time" is non-0, the first timer callback will occur at the specified time, otherwise it will happen in "interval" seconds.

@michaelrsweet michaelrsweet self-assigned this Jun 1, 2022
@michaelrsweet michaelrsweet added enhancement New feature or request priority-high labels Jun 1, 2022
@michaelrsweet michaelrsweet added this to the v1.3 milestone Jun 1, 2022
michaelrsweet added a commit that referenced this issue Jul 20, 2022
@michaelrsweet
Copy link
Owner Author

[master 774bbed] Add timer API (Issue #208)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-high
Projects
None yet
Development

No branches or pull requests

1 participant