summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-12-29 14:29:08 +0000
committerkib <kib@FreeBSD.org>2009-12-29 14:29:08 +0000
commitfb28939ce7beb7a398a69e31346008d37d6dfbb0 (patch)
treefac649e7b60d8011808e2d216eb4a24fb06604fe
parent26975ab6ef921dba95522c38ba45b731803f4357 (diff)
downloadFreeBSD-src-fb28939ce7beb7a398a69e31346008d37d6dfbb0.zip
FreeBSD-src-fb28939ce7beb7a398a69e31346008d37d6dfbb0.tar.gz
Document CLOCK_SECOND, add cross-reference from time(3) to clock_gettime(2).
Based on submission by: pluknet gmail com MFC after: 3 days
-rw-r--r--lib/libc/gen/time.31
-rw-r--r--lib/libc/sys/clock_gettime.29
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/libc/gen/time.3 b/lib/libc/gen/time.3
index 2770e49..d022e06 100644
--- a/lib/libc/gen/time.3
+++ b/lib/libc/gen/time.3
@@ -66,6 +66,7 @@ The
function may fail for any of the reasons described in
.Xr gettimeofday 2 .
.Sh SEE ALSO
+.Xr clock_gettime 2 ,
.Xr gettimeofday 2 ,
.Xr ctime 3
.Sh STANDARDS
diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libc/sys/clock_gettime.2
index 242af1c..485cd25 100644
--- a/lib/libc/sys/clock_gettime.2
+++ b/lib/libc/sys/clock_gettime.2
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 4, 2006
+.Dd December 29, 2009
.Dt CLOCK_GETTIME 2
.Os
.Sh NAME
@@ -70,10 +70,13 @@ which starts at zero when the kernel boots and increments
monotonically in SI seconds while the machine is running,
.Dv CLOCK_VIRTUAL
for time that increments only when
-the CPU is running in user mode on behalf of the calling process, or
+the CPU is running in user mode on behalf of the calling process,
.Dv CLOCK_PROF
for time that increments when the CPU is running in user or
-kernel mode.
+kernel mode, or
+.Dv CLOCK_SECOND
+which returns the current second without performing a full time counter
+query, using in-kernel cached value of current second.
.Pp
The structure pointed to by
.Fa tp
OpenPOWER on IntegriCloud