mirror of
https://github.com/troglobit/libuev.git
synced 2026-11-09 16:21:13 +00:00
Fix periodic timer example
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
151f9294c9
commit
1de445535e
1 file changed
+2
-1
@@ -49,7 +49,8 @@ int main(void)
|
|||||||
uev_ctx_t ctx;
|
uev_ctx_t ctx;
|
||||||
|
|
||||||
uev_init(&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);
|
return uev_run(&ctx, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user