This patch adds support for at/cron-like jobs that need an absolute
timer. The API supports waking up with an UEV_HUP callback event if the
wall clock changed due to NTP or user input while waiting.
- uev_cron_init()
- uev_cron_set()
- uev_cron_start()
- uev_cron_stop()
A very simple cronrun example/test program is also included.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
While comparing the library layout with libite, I noticed how the
formatting of the license paragraphs in all source files had been
garbled. This patch restores the orginal line breaks.
Note: Only whitespace changes, no change in licensing terms!
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
There really does not exist a good reason for us sending a `uev_ctx_t *`
pointer as the first argument to event callbacks. If the callback needs
to reference the context, it can find the ctx pointer in the `uev_t *w`.
This patch removes the first argument from all callbacks and also fixes
a slight bug in that the event loop never returned the actual event that
triggered the callback!
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>