mdoc(7) police: tidy up.

This commit is contained in:
Ruslan Ermilov 2002-03-18 16:18:33 +00:00
parent 3876d839e5
commit 241c7610c2

View File

@ -25,11 +25,11 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd Aug 11, 1999 .Dd August 11, 1999
.Dt TIMERADD 3 .Dt TIMERADD 3
.Os BSD 4 .Os
.Sh NAME .Sh NAME
.Nm timeradd , .Nm timeradd ,
.Nm timersub , .Nm timersub ,
@ -38,30 +38,28 @@
.Nm timercmp .Nm timercmp
.Nd operations on timevals .Nd operations on timevals
.Sh SYNOPSIS .Sh SYNOPSIS
.Fd #include <sys/time.h> .In sys/time.h
.Fn timeradd "&tvp" "&uvp" "&vvp" .Ft void
.Fn timersub "&tvp" "&uvp" "&vvp" .Fn timeradd "struct timeval *a" "struct timeval *b" "struct timeval *res"
.Fn timerclear "&tvp" .Ft void
.Fn timerisset "&tvp" .Fn timersub "struct timeval *a" "struct timeval *b" "struct timeval *res"
.Fn timercmp "&tvp" "&uvp" "cmp" .Ft void
.Fn timerclear "struct timeval *tvp"
.Ft int
.Fn timerisset "struct timeval *tvp"
.Ft int
.Fn timercmp "struct timeval *a" "struct timeval *b" CMP
.Sh DESCRIPTION .Sh DESCRIPTION
.Pp
These macros are provided for manipulating These macros are provided for manipulating
.Fa timeval .Fa timeval
structures for use with the structures for use with the
.Fn gettimeofday .Xr gettimeofday 2
and and
.Fn settimeofday .Xr settimeofday 2
calls. calls.
The structures pointed to by The structure is defined in
.Fa tvp , .Aq Pa sys/time.h
.Fa uvp ,
and
.Fa vvp
are defined in
.Ao Pa sys/time.h Ac
as: as:
.Pp
.Bd -literal .Bd -literal
struct timeval { struct timeval {
long tv_sec; /* seconds since Jan. 1, 1970 */ long tv_sec; /* seconds since Jan. 1, 1970 */
@ -71,26 +69,26 @@ struct timeval {
.Pp .Pp
.Fn timeradd .Fn timeradd
adds the time information stored in adds the time information stored in
.Fa uvp .Fa a
to to
.Fa tvp .Fa b
and stores the resulting and stores the resulting
.Fa timeval .Vt timeval
in in
.Fa vvp . .Fa res .
The results are simplified such that the value of The results are simplified such that the value of
.Fa vvp->tv_usec .Fa res->tv_usec
is always less than 1,000,000 (1 second). is always less than 1,000,000 (1 second).
.Pp .Pp
.Fn timersub .Fn timersub
subtracts the time information stored in subtracts the time information stored in
.Fa uvp .Fa b
from from
.Fa tvp .Fa a
and stores the resulting and stores the resulting
.Fa timeval .Vt timeval
in in
.Fa vvp . .Fa res .
.Pp .Pp
.Fn timerclear .Fn timerclear
initializes initializes
@ -104,14 +102,14 @@ is set to any time value other than the Epoch.
.Pp .Pp
.Fn timercmp .Fn timercmp
compares compares
.Fa tvp .Fa a
to to
.Fa uvp .Fa b
using the comparison operator given in using the comparison operator given in
.Fa cmp .Fa CMP ,
and returns the result of that comparison. and returns the result of that comparison.
.Sh SEE ALSO .Sh SEE ALSO
.Xr gettimeofday 2 .Xr gettimeofday 2
.Sh HISTORY .Sh HISTORY
The The
.Fn timeradd .Fn timeradd