Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/gen Merge FreeBSD improvements to the man-page of t...



details:   https://anonhg.NetBSD.org/src/rev/402d83649d31
branches:  trunk
changeset: 834362:402d83649d31
user:      kamil <kamil%NetBSD.org@localhost>
date:      Fri Aug 10 20:35:52 2018 +0000

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

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

diffstat:

 lib/libc/gen/timespec_get.3 |  28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diffs (70 lines):

diff -r b4888613148e -r 402d83649d31 lib/libc/gen/timespec_get.3
--- a/lib/libc/gen/timespec_get.3       Fri Aug 10 20:11:29 2018 +0000
+++ b/lib/libc/gen/timespec_get.3       Fri Aug 10 20:35:52 2018 +0000
@@ -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 @@
 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 @@
 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 kamil%NetBSD.org@localhost
+.An Warner Losh Aq Mt imp%FreeBSD.org@localhost



Home | Main Index | Thread Index | Old Index