Module Name:    src
Committed By:   christos
Date:           Wed May 22 16:01:44 UTC 2013

Modified Files:
        src/share/man/man9: Makefile
Added Files:
        src/share/man/man9: ts2timo.9

Log Message:
add a man page for ts2timo.


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/share/man/man9/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man9/ts2timo.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.370 src/share/man/man9/Makefile:1.371
--- src/share/man/man9/Makefile:1.370	Thu Mar 28 07:17:41 2013
+++ src/share/man/man9/Makefile	Wed May 22 12:01:44 2013
@@ -1,4 +1,4 @@
-#       $NetBSD: Makefile,v 1.370 2013/03/28 11:17:41 wiz Exp $
+#       $NetBSD: Makefile,v 1.371 2013/05/22 16:01:44 christos Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -51,7 +51,7 @@ MAN=	accept_filter.9 accf_data.9 accf_ht
 	signal.9 skpc.9 sockopt.9 softintr.9 spl.9 splraiseipl.9 \
 	store.9 suspendsched.9 \
 	sysctl.9 sysmon_envsys.9 sysmon_pswitch.9 sysmon_taskq.9 tc.9 \
-	tcp_congctl.9 timecounter.9 time_second.9 todr.9 tvtohz.9 \
+	tcp_congctl.9 timecounter.9 time_second.9 todr.9 ts2timo.9 tvtohz.9 \
 	ucas.9 uiomove.9 ucom.9 userret.9 \
 	vattr.9 veriexec.9 vcons.9 vfs.9 vfs_hooks.9 vfsops.9 vfssubr.9 \
 	video.9 vme.9 \

Added files:

Index: src/share/man/man9/ts2timo.9
diff -u /dev/null src/share/man/man9/ts2timo.9:1.1
--- /dev/null	Wed May 22 12:01:44 2013
+++ src/share/man/man9/ts2timo.9	Wed May 22 12:01:44 2013
@@ -0,0 +1,86 @@
+.\"	$NetBSD: ts2timo.9,v 1.1 2013/05/22 16:01:44 christos Exp $
+.\"
+.\" Copyright (c) 2013 Christos Zoulas
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (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 May 22, 2013
+.Dt TS2TIMO 9
+.Os
+.Sh NAME
+.Nm ts2timo
+.Nd convert time interval to tick count
+.Sh SYNOPSIS
+.In sys/timevar.h
+.Ft int
+.Fn ts2timo "clock_id clock_id" "int flags" "struct timespec *ts" "int *timo" "struct timespec *start"
+.Sh DESCRIPTION
+The
+.Fn ts2timo
+function converts the time interval specified in
+.Fa ts
+into the integral number of system ticks that would elapse (including the
+current tick) and places the result in
+.Fa timo .
+The interval type is specified in the
+.Fa flags
+argument and can be either
+.Dv TIMER_ABSTIME
+or
+.Dv TIMER_RELTIME .
+If the interval is specified as an absolute time, then the
+.Fa clock_id
+clock is used to convert it to a relative time.
+If the
+.Fa start
+argument is not
+.Dv NULL ,
+then current time for the
+.Fa clock_id
+clock is placed in that argument.
+.Sh RETURN VALUES
+On success
+.Fn ts2timo
+returns
+.Dv 0 .
+On failure it returns
+.Er ETIMEDOUT
+if  interval computed was
+.Dv 0
+or negative, and
+.Er EINVAL
+if
+.Fa ts->tv_usec
+field in the computed interval is out of range, or the
+.Fa clock_id
+argument is invalid.
+.El
+.Sh SEE ALSO
+.Xr clock_gettime 3 ,
+.Xr clock_nanosleep 3
+.Sh HISTORY
+The
+.Nm
+function first appeared in
+.Nx 7.0 .

Reply via email to