NAME
itimerfix
—
check that a timeval value is valid,
and correct
SYNOPSIS
#include
<sys/time.h>
int
itimerfix
(struct
timeval *tv);
DESCRIPTION
Theitimerfix
function checks that the value in
tv is valid (0 ≤ tv->tv_sec && 0
≤ tv->tv_usec < 1000000), and that the total time represented is
at least one
tick, or
zero.
If the total represented time is nonzero and smaller than tick, it is adjusted to exactly one tick.
RETURN VALUES
itimerfix
returns 0 on success or
EINVAL
if tv is invalid.