summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1999-03-02 10:30:34 +0000
committerderaadt <deraadt@openbsd.org>1999-03-02 10:30:34 +0000
commit752d7408943351b3dda0555758f4bae99b9542d2 (patch)
treec83c83fa54bbdf9c621f03e5a66969c7391d0375 /lib/libc
parentwss_isapnp; work by apollo@slcnet.net.. (diff)
downloadwireguard-openbsd-752d7408943351b3dda0555758f4bae99b9542d2.tar.xz
wireguard-openbsd-752d7408943351b3dda0555758f4bae99b9542d2.zip
doc timer{clear,add,sub,cmp,isset}
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/getitimer.238
1 files changed, 28 insertions, 10 deletions
diff --git a/lib/libc/sys/getitimer.2 b/lib/libc/sys/getitimer.2
index be6062f2fda..315bf0426ee 100644
--- a/lib/libc/sys/getitimer.2
+++ b/lib/libc/sys/getitimer.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getitimer.2,v 1.6 1999/02/27 21:56:19 deraadt Exp $
+.\" $OpenBSD: getitimer.2,v 1.7 1999/03/02 10:30:34 deraadt Exp $
.\" $NetBSD: getitimer.2,v 1.6 1995/10/12 15:40:54 jtc Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -129,15 +129,33 @@ delivered. Because this signal may interrupt in-progress
system calls, programs using this timer must be prepared to
restart interrupted system calls.
.Sh NOTES
-Three macros for manipulating time values are defined in
-.Ao Pa sys/time.h Ac .
-.Fa timerclear
-sets a time value to zero,
-.Fa timerisset
-tests if a time value is non-zero, and
-.Fa timercmp
-compares two time values (beware that >= and <= do not
-work with this macro).
+Five macros for manipulating time values are defined in
+.Ao Pa sys/time.h Ac :
+.Pp
+.Bl -tag -width xxxx
+.It Fn timerclear "struct timeval *"
+Sets a time value to zero.
+.It Fn timerisset "struct timeval *"
+Tests if a time value is non-zero.
+.It Fn timercmp "struct timeval *a, struct timeval *b, CMP"
+Compares two time values in the form
+.Va a
+CMP
+.Va b Ns ,
+where CMP is <, =, or >
+(beware that >= and <= do not work with this macro).
+.It Fn timersub "struct timeval *a, struct timeval *b, struct timeval *res"
+Subtracts
+.Va a
+-
+.Va b
+and stores the result in
+.Va res Ns .
+.It Fn timeradd "struct timeval *a, struct timeval *a, struct timeval *res"
+Adds two timers and stores the result in
+.Va res Ns .
+.El
+.Pp
.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