timerfd_settime

Sets next expiration time of interval timer source fd to new_value.

extern (C)
int
timerfd_settime
(
int fd
,
int flags
,
itimerspec* new_value
,
itimerspec* old_value
)

Parameters

fd int

file descriptor referring to the timer

flags int

0 starts a relative timer using new_value.it_interval; TFD_TIMER_ABSTIME starts an absolute timer using new_value.it_value.

new_value itimerspec*

- it_value: Specifies the initial expiration of the timer. Setting either field to a non-zero value arms the timer. Setting both fields to zero disarms the timer. - it_interval: Setting one or both fields to non-zero values specifies the period for repeated timer expirations after the initial expiration. If both fields are zero, the timer expires just once, at the time specified by it_value.

old_value itimerspec*

Returns the old expiration time as timerfd_gettime().

Return Value

Type: int

0 on success or -1 on error. Sets errno in case of error.

Meta