emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/doc/lispref/os.texi,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/doc/lispref/os.texi,v
Date: Fri, 17 Oct 2008 19:36:18 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    08/10/17 19:36:18

Index: os.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/lispref/os.texi,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- os.texi     17 Oct 2008 15:40:51 -0000      1.13
+++ os.texi     17 Oct 2008 19:36:17 -0000      1.14
@@ -1330,9 +1330,72 @@
 the inverse conversion, use @code{float-time}.
 @end defun
 
address@hidden format-seconds format-string seconds
+This function converts its argument @var{seconds} into a string of
+years, days, hours, etc., according to @var{format-string}.  The
+argument @var{format-string} may contain @samp{%}-sequences which
+control the conversion.  Here is a table of what the
address@hidden mean:
+
address@hidden @samp
address@hidden %y
address@hidden %Y
+The number of full 365-day years.
address@hidden %d
address@hidden %D
+The number of full days.
address@hidden %h
address@hidden %H
+The number of full hours.
address@hidden %m
address@hidden %M
+The number of full minutes.
address@hidden %s
address@hidden %S
+The number of seconds.
address@hidden %z
+Non-printing control flag.  When it is used, other specifiers must be
+given in the order of decreasing size, i.e.@: years before days, hours
+before minutes, etc.  Nothing will be produced in the result string to
+the left of @samp{%z} until the first non-zero conversion is
+encountered.  For example, the default format used by
address@hidden (@pxref{Processor Run Time, emacs-uptime})
address@hidden@code{"%Y, %D, %H, %M, %z%S"}} means that the number of seconds
+will always be produced, but years, days, hours, and minutes will only
+be shown if they are non-zero.
address@hidden %%
+Produces a literal @samp{%}.
address@hidden table
+
+Upper-case format sequences produce the units in addition to the
+numbers, lower-case formats produce only the numbers.
+
+You can also specify the field width by following the @samp{%} with a
+number; shorter numbers will be padded with blanks.  An optional
+period before the width requests zero-padding instead.  For example,
address@hidden"%.3Y"} might produce @code{"004 years"}.
+
address@hidden:} This function works only with values of @var{seconds}
+that don't exceed @code{most-positive-fixnum} (@pxref{Integer Basics,
+most-positive-fixnum}).
address@hidden defun
+
 @node Processor Run Time
 @section Processor Run time
 @cindex processor run time
address@hidden Emacs process run time
+
+  Emacs provides several functions and primitives that return time,
+both elapsed and processor time, used by the Emacs process.
+
address@hidden emacs-uptime &optional format
+This function returns a string representing the Emacs
address@hidden elapsed wall-clock time this instance of Emacs is
+running.  The string is formatted according to the optional argument
address@hidden  For the available format descriptors, see @ref{Time
+Parsing, format-seconds}.  If @var{format} is nil or omitted, it
+defaults to @code{"%Y, %D, %H, %M, %z%S"}.
address@hidden defun
 
 @defun get-internal-run-time
 This function returns the processor run time used by Emacs as a list
@@ -1349,8 +1412,19 @@
 The third element, @var{microsec}, gives the microseconds (or 0 for
 systems that return time with the resolution of only one second).
 
+Note that the time returned by this function excludes the time Emacs
+was not using the processor, and if the Emacs process has several
+threads, the returned value is the sum of the processor times used up
+by all Emacs threads.
+
 If the system doesn't provide a way to determine the processor run
-time, get-internal-run-time returns the same time as current-time.
+time, @code{get-internal-run-time} returns the same time as
address@hidden
address@hidden defun
+
address@hidden emacs-init-time
+This function returns the duration of the Emacs initialization
+(@pxref{Startup Summary}) in seconds, as a string.
 @end defun
 
 @node Time Calculations




reply via email to

[Prev in Thread] Current Thread [Next in Thread]