Doc: a timer must have a non-zero timeout value to be armed properly

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-11-19 11:29:19 +01:00
1 parent f75b1d5080
commit dbf8c0dae2
2 files changed
+6 -2

No files matched your search

+5 -1
View File
@@ -93,9 +93,13 @@ int uev_timer_init(uev_ctx_t *ctx, uev_t *w, uev_cb_t *cb, void *arg, int timeou
/**
* Reset a timer
* @param w Watcher to reset
* @param timeout Timeout in milliseconds before @param cb is called
* @param timeout Timeout in milliseconds before @param cb is called, zero disarms timer
* @param period For periodic timers this is the period time that @param timeout is reset to
*
* Note, the @param timeout value must be non-zero. Setting it to zero
* will disarm the timer. This is the underlying Linux function @func
* timerfd_settimer() which has this behavior.
*
* @return POSIX OK(0) or non-zero with @param errno set on error.
*/
int uev_timer_set(uev_t *w, int timeout, int period)