Fix periodic timer example

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-10-21 20:51:08 +02:00
parent 151f9294c9
commit 1de445535e
+2 -1
View File
@@ -49,7 +49,8 @@ int main(void)
uev_ctx_t ctx;
uev_init(&ctx);
uev_timer_init(&ctx, &timer, cb, NULL, 2 * 1000, 0);
/* Set up a timer watcher to call cb() every other second */
uev_timer_init(&ctx, &timer, cb, NULL, 0, 2 * 1000);
return uev_run(&ctx, 0);
}