.SH SYNOPSIS
.nf
.B #include <sys/time.h>
-.PP
+.P
.BI "void timeradd(struct timeval *" a ", struct timeval *" b ,
.BI " struct timeval *" res );
.BI "void timersub(struct timeval *" a ", struct timeval *" b ,
.BI " struct timeval *" res );
-.PP
+.P
.BI "void timerclear(struct timeval *" tvp );
.BI "int timerisset(struct timeval *" tvp );
-.PP
+.P
.BI "int timercmp(struct timeval *" a ", struct timeval *" b ", " CMP );
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
All functions shown above:
.nf
Since glibc 2.19:
structures, defined in
.I <sys/time.h>
as:
-.PP
+.P
.in +4n
.EX
struct timeval {
};
.EE
.in
-.PP
+.P
.BR timeradd ()
adds the time values in
.I a
The result is normalized such that
.I res\->tv_usec
has a value in the range 0 to 999,999.
-.PP
+.P
.BR timersub ()
subtracts the time value in
.I b
The result is normalized such that
.I res\->tv_usec
has a value in the range 0 to 999,999.
-.PP
+.P
.BR timerclear ()
zeros out the
.I timeval
structure pointed to by
.IR tvp ,
so that it represents the Epoch: 1970-01-01 00:00:00 +0000 (UTC).
-.PP
+.P
.BR timerisset ()
returns true (nonzero) if either field of the
.I timeval
structure pointed to by
.I tvp
contains a nonzero value.
-.PP
+.P
.BR timercmp ()
compares the timer values in
.I a
.I ==
do not work;
portable applications can instead use
-.PP
+.P
.in +4n
.EX
!timercmp(..., <)