summaryrefslogtreecommitdiff
path: root/share/man/man9/tvtohz.9
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/man9/tvtohz.9
parent6f2fbc37f840ee145c9383b8eff091ec96cba520 (diff)
Add tstohz(9) as the timespec analog to tvtohz(9).
ok miod
Diffstat (limited to 'share/man/man9/tvtohz.9')
-rw-r--r--share/man/man9/tvtohz.918
1 files changed, 12 insertions, 6 deletions
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 ,