OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man7 / time.7
index bab561d..8c30052 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (c) 2006 by Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" 2008-06-24, mtk: added some details about where jiffies come into
 .\"     play; added section on high-resolution timers.
 .\"
-.TH TIME 7 2010-02-25 "Linux" "Linux Programmer's Manual"
+.TH TIME 7 2012-10-28 "Linux" "Linux Programmer's Manual"
 .SH NAME
 time \- overview of time and timers
 .SH DESCRIPTION
-.SS "Real time and process time"
+.SS Real time and process time
 .I "Real time"
 is defined as time measured from some fixed point,
 either from a standard point in the past
@@ -54,14 +56,14 @@ A program can determine the amount of CPU time it has consumed using
 .BR getrusage (2),
 or
 .BR clock (3).
-.SS "The Hardware Clock"
+.SS The hardware clock
 Most computers have a (battery-powered) hardware clock which the kernel
 reads at boot time in order to initialize the software clock.
 For further details, see
 .BR rtc (4)
 and
 .BR hwclock (8).
-.SS "The Software Clock, HZ, and Jiffies"
+.SS The software clock, HZ, and jiffies
 The accuracy of various system calls that set timeouts,
 (e.g.,
 .BR select (2),
@@ -97,12 +99,12 @@ The
 system call is a special case.
 It reports times with a granularity defined by the kernel constant
 .IR USER_HZ .
-Userspace applications can determine the value of this constant using
+User-space applications can determine the value of this constant using
 .IR sysconf(_SC_CLK_TCK) .
 .\" glibc gets this info with a little help from the ELF loader;
 .\" see glibc elf/dl-support.c and kernel fs/binfmt_elf.c.
 .\"
-.SS "High-Resolution Timers"
+.SS High-resolution timers
 Before Linux 2.6.21, the accuracy of timer and sleep system calls
 (see below) was also limited by the size of the jiffy.
 
@@ -121,7 +123,7 @@ or looking at the "resolution" entries in
 
 HRTs are not supported on all hardware architectures.
 (Support is provided on x86, arm, and powerpc, among others.)
-.SS "The Epoch"
+.SS The Epoch
 UNIX systems represent time in seconds since the
 .IR Epoch ,
 1970-01-01 00:00:00 +0000 (UTC).
@@ -137,7 +139,7 @@ provides similar information, but only with accuracy to the
 nearest second.
 The system time can be changed using
 .BR settimeofday (2).
-.SS "Broken-down time"
+.SS Broken-down time
 Certain library functions use a structure of
 type
 .I tm
@@ -155,7 +157,7 @@ string representations of the time are described in
 .BR strftime (3),
 and
 .BR strptime (3).
-.SS "Sleeping and Setting Timers"
+.SS Sleeping and setting timers
 Various system calls and functions allow a program to sleep
 (suspend execution) for a specified period of time; see
 .BR nanosleep (2),
@@ -171,7 +173,21 @@ see
 .BR timerfd_create (2),
 and
 .BR timer_create (2).
-.SH "SEE ALSO"
+.SS Timer slack
+Since Linux 2.6.28, it is possible to control the "timer slack"
+value for a thread.
+The timer slack is the length of time by
+which the kernel may delay the wake-up of certain
+system calls that block with a timeout.
+Permitting this delay allows the kernel to coalesce wake-up events,
+thus possibly reducing the number of system wake-ups and saving power.
+For more details, see the description of
+.B PR_SET_TIMERSLACK
+in
+.BR prctl (2).
+.SH SEE ALSO
+.ad l
+.nh
 .BR date (1),
 .BR time (1),
 .BR adjtimex (2),
@@ -201,3 +217,12 @@ and
 .BR usleep (3),
 .BR rtc (4),
 .BR hwclock (8)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.