timerfd_create.2: Document CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM, and CLOCK_BOOTTIME_ALARM

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-11-21 15:11:32 +01:00
parent 1bf5cb75dd
commit 4c7471193b
1 changed files with 33 additions and 9 deletions

View File

@ -67,15 +67,6 @@ The
.I clockid
argument specifies the clock that is used to mark the progress
of the timer, and must one of the following:
.\" FIXME
.\" Additional clocks are now supported:
.\" CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM
.\" Since Linux 3.11
.\" commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8
.\"
.\" CLOCK_BOOTTIME
.\" Since Linux 3.15
.\" commit 4a2378a943f09907fb1ae35c15de917f60289c14
.TP
.B CLOCK_REALTIME
A settable system-wide real-time clock.
@ -84,6 +75,39 @@ A settable system-wide real-time clock.
A nonsettable monotonically increasing clock that measures time
from some unspecified point in the past that does not change
after system startup.
.TP
.BR CLOCK_BOOTTIME " (Since Linux 3.15)"
.\" commit 4a2378a943f09907fb1ae35c15de917f60289c14
Like
.BR CLOCK_MONOTONIC ,
this is a monotonically increasing clock.
However, whereas the
.BR CLOCK_MONOTONIC
clock does not measure the time while a system is suspended, the
.BR CLOCK_BOOTTIME
clock does include the time during which the system is suspended.
This is useful for applications that need to be suspend-aware.
.BR CLOCK_REALTIME
is not suitable for such applications, since that clock is affected
by discontinuous changes to the system clock.
.TP
.BR CLOCK_REALTIME_ALARM " (since Linux 3.11)"
.\" commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8
This clock is like
.BR CLOCK_REALTIME ,
but will wake the system if it is suspended.
The caller must have the
.B CAP_WAKE_ALARM
capability in order to set a timer against this clock.
.TP
.BR CLOCK_BOOTTIME_ALARM " (since Linux 3.11)"
.\" commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8
This clock is like
.BR CLOCK_BOOTTIME ,
but will wake the system if it is suspended.
The caller must have the
.B CAP_WAKE_ALARM
capability in order to set a timer against this clock.
.PP
The current value of each of these clocks can be retrieved using
.BR clock_gettime (2).