summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2019-01-17 23:01:27 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2019-01-17 23:01:27 +0000
commitb0f28b8a942a756d44b45264ddc3e5337f8dee42 (patch)
tree0ccbf089fad735d57084e8ef19a175a9995fb8ed /share/man
parent3530fbf49fdc9d57c8bfc2ec21e1e82edff1a7de (diff)
clarify and docuement what happens when a tv or ts exceeps INT_MIN ticks.
with some help from cheloha and schwarze
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/tvtohz.913
1 files changed, 7 insertions, 6 deletions
diff --git a/share/man/man9/tvtohz.9 b/share/man/man9/tvtohz.9
index 213ebc44303..59af4709f7f 100644
--- a/share/man/man9/tvtohz.9
+++ b/share/man/man9/tvtohz.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tvtohz.9,v 1.9 2015/06/11 16:04:55 mikeb Exp $
+.\" $OpenBSD: tvtohz.9,v 1.10 2019/01/17 23:01:26 tedu Exp $
.\"
.\" Copyright (c) 1999 Marc Espie
.\" All rights reserved.
@@ -23,7 +23,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 11 2015 $
+.Dd $Mdocdate: January 17 2019 $
.Dt TVTOHZ 9
.Os
.Sh NAME
@@ -43,13 +43,14 @@ The
.Fn tvtohz
and
.Fn tstohz
-functions compute the number of
-.Va hz
-in the specified amount of time.
+functions return the number of ticks in the specified amount of time.
+If the return value would exceed the maximum value representable by an int,
+it is capped at
+.Dv INT_MAX .
They are mainly used to translate a timeval or timespec,
respectively,
into a suitable argument for
-.Xr timeout 9 .
+.Xr tsleep 9 .
.Sh CODE REFERENCES
These functions are implemented in the file
.Pa sys/kern/kern_clock.c .