mirror of https://github.com/mkerrisk/man-pages
clock_getres.2: Clarify difference between CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW
Note interactions of these two clocks with discontinuous adjustments to the system time and NTP/adjtime(2). Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
5f04b9486b
commit
63f0f3d9b8
|
@ -29,7 +29,7 @@
|
||||||
.\"
|
.\"
|
||||||
.\" FIXME: Linux 2.6.39 adds CLOCK_BOOTTIME
|
.\" FIXME: Linux 2.6.39 adds CLOCK_BOOTTIME
|
||||||
.\"
|
.\"
|
||||||
.TH CLOCK_GETRES 2 2010-02-03 "" "Linux Programmer's Manual"
|
.TH CLOCK_GETRES 2 2012-04-25 "" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
clock_getres, clock_gettime, clock_settime \- clock and time functions
|
clock_getres, clock_gettime, clock_settime \- clock and time functions
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -128,13 +128,20 @@ Setting this clock requires appropriate privileges.
|
||||||
.B CLOCK_MONOTONIC
|
.B CLOCK_MONOTONIC
|
||||||
Clock that cannot be set and represents monotonic time since
|
Clock that cannot be set and represents monotonic time since
|
||||||
some unspecified starting point.
|
some unspecified starting point.
|
||||||
|
This clock is not affected by discontinuous jumps in the system time
|
||||||
|
(e.g., if the system administrator manually changes the clock),
|
||||||
|
but is affected by the incremental adjustments performed by
|
||||||
|
.BR adjtime (2)
|
||||||
|
and NTP.
|
||||||
.TP
|
.TP
|
||||||
.BR CLOCK_MONOTONIC_RAW " (since Linux 2.6.28; Linux-specific)"
|
.BR CLOCK_MONOTONIC_RAW " (since Linux 2.6.28; Linux-specific)"
|
||||||
.\" Added in commit 2d42244ae71d6c7b0884b5664cf2eda30fb2ae68, John Stultz
|
.\" Added in commit 2d42244ae71d6c7b0884b5664cf2eda30fb2ae68, John Stultz
|
||||||
Similar to
|
Similar to
|
||||||
.BR CLOCK_MONOTONIC ,
|
.BR CLOCK_MONOTONIC ,
|
||||||
but provides access to a raw hardware-based time
|
but provides access to a raw hardware-based time
|
||||||
that is not subject to NTP adjustments.
|
that is not subject to NTP adjustments or
|
||||||
|
the incremental adjustments performed by
|
||||||
|
.BR adjtime (2).
|
||||||
.TP
|
.TP
|
||||||
.B CLOCK_PROCESS_CPUTIME_ID
|
.B CLOCK_PROCESS_CPUTIME_ID
|
||||||
High-resolution per-process timer from the CPU.
|
High-resolution per-process timer from the CPU.
|
||||||
|
@ -227,7 +234,7 @@ On Linux, these clocks are not settable
|
||||||
.\" See http://bugzilla.kernel.org/show_bug.cgi?id=11972
|
.\" See http://bugzilla.kernel.org/show_bug.cgi?id=11972
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR date (1),
|
.BR date (1),
|
||||||
.BR adjtimex (2),
|
.BR adjtime (2),
|
||||||
.BR gettimeofday (2),
|
.BR gettimeofday (2),
|
||||||
.BR settimeofday (2),
|
.BR settimeofday (2),
|
||||||
.BR time (2),
|
.BR time (2),
|
||||||
|
@ -236,4 +243,4 @@ On Linux, these clocks are not settable
|
||||||
.BR ftime (3),
|
.BR ftime (3),
|
||||||
.BR pthread_getcpuclockid (3),
|
.BR pthread_getcpuclockid (3),
|
||||||
.BR sysconf (3),
|
.BR sysconf (3),
|
||||||
.BR time (7)
|
time (7)
|
||||||
|
|
Loading…
Reference in New Issue