.Nd get/set value of interval timer
.Sh SYNOPSIS
.Fd #include <sys/time.h>
+.Pp
.Fd #define ITIMER_REAL 0
.Fd #define ITIMER_VIRTUAL 1
.Fd #define ITIMER_PROF 2
.Ft int
-.Fn getitimer "int which" "struct itimerval *value"
+.Fo getitimer
+.Fa "int which"
+.Fa "struct itimerval *value"
+.Fc
.Ft int
-.Fn setitimer "int which" "const struct itimerval *value" "struct itimerval *ovalue"
+.Fo setitimer
+.Fa "int which"
+.Fa "const struct itimerval *restrict value"
+.Fa "struct itimerval *restrict ovalue"
+.Fc
.Sh DESCRIPTION
The system provides each process with three interval timers,
defined in
compares two time values (beware that >= and <= do not
work with this macro).
.Sh RETURN VALUES
-If the calls succeed, a value of 0 is returned. If an error occurs,
-the value -1 is returned, and a more precise error code is placed
-in the global variable
-.Va errno .
+Upon successful completion, a value of 0 is returned.
+Otherwise, a value of -1 is returned and the global integer variable
+.Va errno
+is set to indicate the error.
.Sh ERRORS
.Fn Getitimer
and
.Fn setitimer
will fail if:
.Bl -tag -width Er
+.\" ==========
.It Bq Er EFAULT
The
.Fa value
parameter specified a bad address.
+.\" ==========
.It Bq Er EINVAL
-A
+The
.Fa value
-parameter specified a time that was too large
-to be handled.
+parameter specified a time that was too large to be handled
+or not in the canonical form.
+.\" ==========
+.It Bq Er EINVAL
+The
+.Fa which
+parameter was invalid.
.El
.Sh SEE ALSO
+.Xr gettimeofday 2 ,
.Xr select 2 ,
-.Xr sigaction 2 ,
-.Xr gettimeofday 2
+.Xr sigaction 2
.Sh HISTORY
The
.Fn getitimer