diff options
author | cheloha <cheloha@cvs.openbsd.org> | 2019-05-10 19:14:13 +0000 |
---|---|---|
committer | cheloha <cheloha@cvs.openbsd.org> | 2019-05-10 19:14:13 +0000 |
commit | 42c977ae94893825aa63ec954777089c17f36d94 (patch) | |
tree | 320ec8aade9ea5adf5bc51a7fb7ccfc46be4f8d1 | |
parent | e1774a757ebe6d6eb1dcdaf60ba9bd1ad479ab1f (diff) |
Document TIMEVAL_TO_TIMESPEC() and TIMESPEC_TO_TIMEVAL().
With input from schwarze@.
"read ok" jmc@, "yep" deraadt@, ok schwarze@
-rw-r--r-- | share/man/man3/timeradd.3 | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/share/man/man3/timeradd.3 b/share/man/man3/timeradd.3 index 1690c4604ae..d89bac1176a 100644 --- a/share/man/man3/timeradd.3 +++ b/share/man/man3/timeradd.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: timeradd.3,v 1.2 2019/02/07 17:09:28 schwarze Exp $ +.\" $OpenBSD: timeradd.3,v 1.3 2019/05/10 19:14:12 cheloha Exp $ .\" $NetBSD: getitimer.2,v 1.6 1995/10/12 15:40:54 jtc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)getitimer.2 8.2 (Berkeley) 12/11/93 .\" -.Dd $Mdocdate: February 7 2019 $ +.Dd $Mdocdate: May 10 2019 $ .Dt TIMERADD 3 .Os .Sh NAME @@ -45,7 +45,9 @@ .Nm timespecisvalid , .Nm timespeccmp , .Nm timespecsub , -.Nm timespecadd +.Nm timespecadd , +.Nm TIMEVAL_TO_TIMESPEC , +.Nm TIMESPEC_TO_TIMEVAL .Nd manipulate time structures .Sh SYNOPSIS .In sys/time.h @@ -73,6 +75,10 @@ .Fn timespecsub "struct timespec *a" "struct timespec *b" "struct timespec *c" .Ft void .Fn timespecadd "struct timespec *a" "struct timespec *b" "struct timespec *c" +.Ft void +.Fn TIMEVAL_TO_TIMESPEC "struct timeval *tv" "struct timespec *ts" +.Ft void +.Fn TIMESPEC_TO_TIMEVAL "struct timeval *tv" "struct timespec *ts" .Sh DESCRIPTION The .Fn timer* @@ -133,6 +139,20 @@ to .Fa a and store the result in .Fa c . +.It Fn TIMEVAL_TO_TIMESPEC tv ts +Convert +.Fa tv +to a +.Vt struct timespec +and store the result in +.Fa ts . +.It Fn TIMESPEC_TO_TIMEVAL tv ts +Convert +.Fa ts +to a +.Vt struct timeval +and store the result in +.Fa tv . .El .Sh RETURN VALUES The macros returning @@ -162,6 +182,11 @@ and .Fn timercmp first appeared in .Bx 4.1c , +.Fn TIMEVAL_TO_TIMESPEC +and +.Fn TIMESPEC_TO_TIMEVAL +in +.Bx 4.4 , .Fn timersub and .Fn timeradd @@ -171,3 +196,7 @@ and .Fn timerisvalid in .Ox 6.5 . +.Sh CAVEATS +The argument ordering for +.Fn TIMESPEC_TO_TIMEVAL +is unintuitive. |