svn commit: r201201 - in head/lib/libc: gen sys

Konstantin Belousov kib at FreeBSD.org
Tue Dec 29 14:29:09 UTC 2009


Author: kib
Date: Tue Dec 29 14:29:08 2009
New Revision: 201201
URL: http://svn.freebsd.org/changeset/base/201201

Log:
  Document CLOCK_SECOND, add cross-reference from time(3) to clock_gettime(2).
  
  Based on submission by:	pluknet gmail com
  MFC after:	3 days

Modified:
  head/lib/libc/gen/time.3
  head/lib/libc/sys/clock_gettime.2

Modified: head/lib/libc/gen/time.3
==============================================================================
--- head/lib/libc/gen/time.3	Tue Dec 29 14:06:36 2009	(r201200)
+++ head/lib/libc/gen/time.3	Tue Dec 29 14:29:08 2009	(r201201)
@@ -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

Modified: head/lib/libc/sys/clock_gettime.2
==============================================================================
--- head/lib/libc/sys/clock_gettime.2	Tue Dec 29 14:06:36 2009	(r201200)
+++ head/lib/libc/sys/clock_gettime.2	Tue Dec 29 14:29:08 2009	(r201201)
@@ -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 boo
 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


More information about the svn-src-all mailing list