diff options
| author | Paul Eggert | 2016-11-19 14:43:25 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-11-19 14:43:25 -0800 |
| commit | 870c56a0bd8fe51baa2efa20a75b848f2bd27fd4 (patch) | |
| tree | 411a65a0f148e4df8ca1e43ce103c2d96badaccf /doc | |
| parent | 6a03b47f81c5a8f44d7bc524fce93d6f63dc4d08 (diff) | |
| parent | 07f45d77816c947d90e1c56d489a6b32bdacdda0 (diff) | |
| download | emacs-870c56a0bd8fe51baa2efa20a75b848f2bd27fd4.tar.gz emacs-870c56a0bd8fe51baa2efa20a75b848f2bd27fd4.zip | |
Merge from origin/emacs-25
07f45d7 ; Spelling fix
1a210f0 * admin/release-process: Update versions and blocking bug num...
36bafc9 Improve documentation of functions that accept time values
# Conflicts:
# admin/release-process
# src/editfns.c
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/os.texi | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 903bad3b9c5..616d1e7ab3a 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -1474,7 +1474,7 @@ corresponding time value. | |||
| 1474 | @defun format-time-string format-string &optional time zone | 1474 | @defun format-time-string format-string &optional time zone |
| 1475 | 1475 | ||
| 1476 | This function converts @var{time} (or the current time, if | 1476 | This function converts @var{time} (or the current time, if |
| 1477 | @var{time} is omitted) to a string according to | 1477 | @var{time} is omitted or @code{nil}) to a string according to |
| 1478 | @var{format-string}. The conversion uses the time zone rule @var{zone}, which | 1478 | @var{format-string}. The conversion uses the time zone rule @var{zone}, which |
| 1479 | defaults to the current time zone rule. @xref{Time Zone Rules}. The argument | 1479 | defaults to the current time zone rule. @xref{Time Zone Rules}. The argument |
| 1480 | @var{format-string} may contain @samp{%}-sequences which say to | 1480 | @var{format-string} may contain @samp{%}-sequences which say to |
| @@ -1692,7 +1692,9 @@ interactively, it prints the duration in the echo area. | |||
| 1692 | @cindex calendrical computations | 1692 | @cindex calendrical computations |
| 1693 | 1693 | ||
| 1694 | These functions perform calendrical computations using time values | 1694 | These functions perform calendrical computations using time values |
| 1695 | (@pxref{Time of Day}). | 1695 | (@pxref{Time of Day}). A value of @code{nil} for any of their |
| 1696 | time-value arguments stands for the current system time, and a single | ||
| 1697 | integer number stands for the number of seconds since the epoch. | ||
| 1696 | 1698 | ||
| 1697 | @defun time-less-p t1 t2 | 1699 | @defun time-less-p t1 t2 |
| 1698 | This returns @code{t} if time value @var{t1} is less than time value | 1700 | This returns @code{t} if time value @var{t1} is less than time value |
| @@ -1701,12 +1703,15 @@ This returns @code{t} if time value @var{t1} is less than time value | |||
| 1701 | 1703 | ||
| 1702 | @defun time-subtract t1 t2 | 1704 | @defun time-subtract t1 t2 |
| 1703 | This returns the time difference @var{t1} @minus{} @var{t2} between | 1705 | This returns the time difference @var{t1} @minus{} @var{t2} between |
| 1704 | two time values, as a time value. | 1706 | two time values, as a time value. If you need the difference in units |
| 1707 | of elapsed seconds, use @code{float-time} (@pxref{Time of Day, | ||
| 1708 | float-time}) to convert the result into seconds. | ||
| 1705 | @end defun | 1709 | @end defun |
| 1706 | 1710 | ||
| 1707 | @defun time-add t1 t2 | 1711 | @defun time-add t1 t2 |
| 1708 | This returns the sum of two time values, as a time value. | 1712 | This returns the sum of two time values, as a time value. |
| 1709 | One argument should represent a time difference rather than a point in time. | 1713 | One argument should represent a time difference rather than a point in time, |
| 1714 | either as a list or as a single number of elapsed seconds. | ||
| 1710 | Here is how to add a number of seconds to a time value: | 1715 | Here is how to add a number of seconds to a time value: |
| 1711 | 1716 | ||
| 1712 | @example | 1717 | @example |