summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2013-04-24 17:29:03 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2013-04-24 17:29:03 +0000
commit36c2d47930c3157a79d7035f8f5ed029408c3c7c (patch)
tree80aeeaaf0ec7efc581ee2c39b8d3ba1924ac068a /share/man
parent6f2fbc37f840ee145c9383b8eff091ec96cba520 (diff)
Add tstohz(9) as the timespec analog to tvtohz(9).
ok miod
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/Makefile3
-rw-r--r--share/man/man9/tvtohz.918
2 files changed, 14 insertions, 7 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index af4cfbc4f2d..7b1753d88f2 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.176 2013/01/29 01:19:27 dlg Exp $
+# $OpenBSD: Makefile,v 1.177 2013/04/24 17:29:02 matthew Exp $
# $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@@ -329,6 +329,7 @@ MLINKS+=timeout.9 timeout_add.9 timeout.9 timeout_set.9 \
timeout.9 timeout_add_usec.9 \
timeout.9 timeout_add_nsec.9
MLINKS+=tsleep.9 wakeup.9 tsleep.9 msleep.9
+MLINKS+=tvtohz.9 tstohz.9
MLINKS+=uiomove.9 uio.9
MLINKS+=uvm.9 uvm_init.9 uvm.9 uvm_init_limits.9 uvm.9 uvm_setpagesize.9 \
uvm.9 uvm_swap_init.9 uvm.9 uvm_map.9 uvm.9 uvm_map_pageable.9 \
diff --git a/share/man/man9/tvtohz.9 b/share/man/man9/tvtohz.9
index 90ebd3a5e99..eca8a0d2953 100644
--- a/share/man/man9/tvtohz.9
+++ b/share/man/man9/tvtohz.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tvtohz.9,v 1.5 2010/08/20 22:03:22 matthew Exp $
+.\" $OpenBSD: tvtohz.9,v 1.6 2013/04/24 17:29:02 matthew Exp $
.\"
.\" Copyright (c) 1999 Marc Espie
.\" All rights reserved.
@@ -23,11 +23,12 @@
.\" (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: August 20 2010 $
+.Dd $Mdocdate: April 24 2013 $
.Dt TVTOHZ 9
.Os
.Sh NAME
-.Nm tvtohz
+.Nm tvtohz ,
+.Nm tstohz
.Nd translate time period to timeout delay
.Sh SYNOPSIS
.Fd #include <sys/types.h>
@@ -35,16 +36,21 @@
.Fd #include <sys/systm.h>
.Ft int
.Fn tvtohz "const struct timeval *tv"
+.Ft int
+.Fn tstohz "const struct timespec *ts"
.Sh DESCRIPTION
The
.Fn tvtohz
-function computes the number of
+and
+.Fn tstohz
+functions compute the number of
.Va hz
in the specified amount of time.
-This is mainly used to translate a timeval into a suitable argument for
+These are mainly used to translate a timeval or timespec
+into a suitable argument for
.Xr timeout 9 .
.Sh CODE REFERENCES
-This function is implemented in the file
+These functions are implemented in the file
.Pa sys/kern/kern_clock.c .
.Sh SEE ALSO
.Xr hz 9 ,