Simplify test.c example, no need to stop timer before exit.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-01-11 14:05:41 +01:00
1 parent 2a6697d514
commit 96a497b03e
1 file changed
+3 -3
+3 -3
View File
@@ -42,17 +42,17 @@ static uev_t *watchdog;
static void lifetime_cb(uev_ctx_t *ctx, uev_t UNUSED(*w), void *arg, int UNUSED(events))
{
fprintf(stderr, "\nLifetime exceeded %p\n", arg);
fprintf(stderr, "\nLifetime exceeded, program completed successfully! (arg:%p)\n", arg);
uev_exit(ctx);
}
/* The pipe watchdog, if it triggers we haven't received data in time. */
static void timeout_cb(uev_ctx_t *ctx, uev_t *w, void *arg, int UNUSED(events))
static void timeout_cb(uev_ctx_t *ctx, uev_t *UNUSED(w), void *arg, int UNUSED(events))
{
watchdog = NULL;
fprintf(stderr, "\nTimeout exceeded %p\n", arg);
uev_timer_stop(w);
// uev_timer_stop(w); <-- No need to stop timers with period=0 :)
uev_exit(ctx);
}