aboutsummaryrefslogtreecommitdiffstats
path: root/man2/getitimer.2
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2005-04-06 15:29:32 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2005-04-06 15:29:32 +0000
commitfcad9022d38d22289b7b4bef81c9cd94dc8be8f4 (patch)
tree34edec32c260c2662c9956cbdf0ab6388d6e256b /man2/getitimer.2
parentc93df97462cc959c83e73a2a8f91f9be93c911b8 (diff)
downloadman-pages-fcad9022d38d22289b7b4bef81c9cd94dc8be8f4.tar.gz
Matthias Lang, mtk
Noted MAX_SEC_IN_JIFFIES ceiling. Added note about treatment of out-of-range tv_usec values.
Diffstat (limited to 'man2/getitimer.2')
-rw-r--r--man2/getitimer.226
1 files changed, 23 insertions, 3 deletions
diff --git a/man2/getitimer.2 b/man2/getitimer.2
index 530a14605b..38e5d399b1 100644
--- a/man2/getitimer.2
+++ b/man2/getitimer.2
@@ -2,6 +2,8 @@
.\" Based on a similar page Copyright 1992 by Rick Faith
.\" May be freely distributed
.\" Modified Tue Oct 22 00:22:35 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
+.\" 2005-04-06 mtk, Matthias Lang <matthias@corelatus.se>
+.\" Noted MAX_SEC_IN_JIFFIES ceiling
.TH GETITIMER 2 1993-08-05 "Linux 0.99.11" "Linux Programmer's Manual"
.SH NAME
getitimer, setitimer \- get or set value of an interval timer
@@ -75,10 +77,10 @@ with the current setting for the timer indicated by
or
.BR ITIMER_PROF ).
The element
-.B it_value
+.I it_value
is set to the amount of time remaining on the timer, or zero if the timer
is disabled. Similarly,
-.B it_interval
+.I it_interval
is set to the reset value.
The function
.B setitimer
@@ -133,7 +135,7 @@ is not one of
or
.BR ITIMER_PROF .
.SH "CONFORMING TO"
-SVr4, 4.4BSD (This call first appeared in 4.2BSD).
+POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).
.SH "SEE ALSO"
.BR gettimeofday (2),
.BR sigaction (2),
@@ -145,3 +147,21 @@ conceivable that under pathologically heavy loading,
.B ITIMER_REAL
will expire before the signal from a previous expiration has been delivered.
The second signal in such an event will be lost.
+
+On Linux, timer values are represented in jiffies.
+If a request is made set a timer with a value whose jiffies
+representation exceeds MAX_SEC_IN_JIFFIES
+(defined in
+.IR include/linux/jiffies.h ),
+then the timer is silently truncated to this ceiling value.
+On Linux 2.6 on x86 (where a jiffy is 0.001 seconds),
+this means that the ceiling value for a timer is
+approximately 24.86 days.
+
+POSIX.1 says that
+.B setitimer
+should fail if a
+.I tv_usec
+value is specified that is outside of the range 0 to 999999.
+However, Linux does not give an error, but instead silently
+adjusts the corresponding seconds value for the timer.