summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/clock_gettime.231
1 files changed, 28 insertions, 3 deletions
diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libc/sys/clock_gettime.2
index e7b36d7121f..c5d52f0a16c 100644
--- a/lib/libc/sys/clock_gettime.2
+++ b/lib/libc/sys/clock_gettime.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: clock_gettime.2,v 1.21 2013/06/17 19:11:54 guenther Exp $
+.\" $OpenBSD: clock_gettime.2,v 1.22 2013/10/06 01:27:50 guenther Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 17 2013 $
+.Dd $Mdocdate: October 6 2013 $
.Dt CLOCK_GETTIME 2
.Os
.Sh NAME
@@ -73,7 +73,13 @@ time that increments when the CPU is running in user or kernel mode
on behalf of the calling thread
.It Dv CLOCK_MONOTONIC
time that increments as a wall clock should but whose absolute value
-is meaningless and cannot jump, providing accurate interval measurement
+is meaningless and cannot jump,
+providing accurate realtime interval measurement,
+even across suspend and resume
+.It Dv CLOCK_UPTIME
+time whose absolute value is the time the system has been running
+and not suspended,
+providing accurate uptime measurement, both absolute and interval
.El
.Pp
The structure pointed to by
@@ -153,3 +159,22 @@ and
.Fn clock_settime
functions conform to
.St -p1003.1-2008 .
+.Pp
+The
+.Dv CLOCK_UPTIME
+clock is an extension to that.
+.Sh HISTORY
+The
+.Dv CLOCK_PROCESS_CPUTIME_ID
+and
+.Dv CLOCK_THREAD_CPUTIME_ID
+clocks appeared in
+.Ox 5.4 .
+The
+.Dv CLOCK_UPTIME
+clock first appeared in
+.Fx 7.0
+and was added to
+.Ox
+in
+.Ox 5.5 .