Module Name:    src
Committed By:   kamil
Date:           Fri Aug 10 20:35:52 UTC 2018

Modified Files:
        src/lib/libc/gen: timespec_get.3

Log Message:
Merge FreeBSD improvements to the man-page of timespec_get(3)

Keep NetBSD references instead of FreeBSD ones included in the FreeBSD
version.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gen/timespec_get.3

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

Modified files:

Index: src/lib/libc/gen/timespec_get.3
diff -u src/lib/libc/gen/timespec_get.3:1.2 src/lib/libc/gen/timespec_get.3:1.3
--- src/lib/libc/gen/timespec_get.3:1.2	Tue Oct  4 10:46:40 2016
+++ src/lib/libc/gen/timespec_get.3	Fri Aug 10 20:35:52 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: timespec_get.3,v 1.2 2016/10/04 10:46:40 wiz Exp $
+.\"	$NetBSD: timespec_get.3,v 1.3 2018/08/10 20:35:52 kamil Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 4, 2016
+.Dd August 10, 2018
 .Dt TIMESPEC_GET 3
 .Os
 .Sh NAME
@@ -37,7 +37,6 @@
 .Lb libc
 .Sh SYNOPSIS
 .In time.h
-.Vt #define TIME_UTC 1
 .Ft int
 .Fn timespec_get "struct timespec *ts" "int base"
 .Sh DESCRIPTION
@@ -48,9 +47,14 @@ function sets the interval pointed to by
 to hold the current calendar time based on the specified time base in
 .Fa base .
 .Pp
-Currently the only supported valid base is
-.Dv TIME_UTC .
-It returns time elapsed since epoch.
+The base
+.Dv TIME_UTC
+returns the time since the epoch.
+This time is expressed in seconds and nanoseconds since midnight (0 hour), January 1, 1970.
+In
+.Nx ,
+this corresponds to
+.Dv CLOCK_REALTIME .
 .Sh RETURN VALUES
 The
 .Nm
@@ -59,16 +63,22 @@ function returns the passed value of
 if successful, otherwise
 .Dv 0
 on failure.
-.\" .Sh ERRORS
 .Sh SEE ALSO
-.Xr clock_gettime 2
+.Xr gettimeofday 2 ,
+.Xr clock_gettime 2 ,
+.Xr time 3
 .Sh STANDARDS
 The
 .Nm
-function conforms to
+function with a
+.Fa base
+of
+.Dv TIME_UTC
+conforms to
 .St -isoC-2011 .
 .Sh HISTORY
 This interface first appeared in
 .Nx 8 .
 .Sh AUTHORS
 .An Kamil Rytarowski Aq Mt [email protected]
+.An Warner Losh Aq Mt [email protected]

Reply via email to