The specified timer will first expire after the time specified in the 'it_value' field of the itimerval structure. Similarly, upon retrieval the 'it_value' field will contain the time after which the timer will expire.
.PP
If 'it_value' is zero, then the timer is disabled, and the 'it_interval' field is ignored and (upon retrieval) set to zero. Otherwise, 'it_interval' contains the repetition interval after which the timer will repeatedly expire, starting from the moment that the timer expires for the first time according to the 'it_value' value. If 'it_interval' is set to zero, no repetition will occur.
.PP
The maximum supported timeout value that
.Bsetitimer
accepts, depends on the clock tick rate of the operating system.
.PP
These functions share their real-time timer with
.BRalarm(2).
Therefore, use of both types of functions in one program yields undefined results.
.SHRETURNVALUES
Upon successful completion, these functions return 0. Otherwise, a value of -1 is returned and \fIerrno\fP is set to indicate the error.
.SHERRORS
The functions will fail if any of the following occur:
.TP15
.BEINVAL
Either \fIwhich\fP is not one of the ITIMER_* constants above, or one of the timeval structures in \fIvalue\fP contains a bad or too large value.