comparison lispref/os.texi @ 76854:74d5354ad0c4

(Timers): Fix description of run-at-time TIME formats.
author Glenn Morris <rgm@gnu.org>
date Sat, 31 Mar 2007 23:29:38 +0000
parents fc9d442f98d2
children 44bc179f404b
comparison
equal deleted inserted replaced
76853:4218ede6f4f2 76854:74d5354ad0c4
1419 @var{repeat} seconds after @var{time}. If @var{repeat} is @code{nil}, 1419 @var{repeat} seconds after @var{time}. If @var{repeat} is @code{nil},
1420 the timer runs only once. 1420 the timer runs only once.
1421 1421
1422 @var{time} may specify an absolute or a relative time. 1422 @var{time} may specify an absolute or a relative time.
1423 1423
1424 Absolute times may be specified in a wide variety of formats; this 1424 Absolute times may be specified using a string with a limited variety of
1425 function tries to accept all the commonly used date formats. The most 1425 formats, and are taken to be times @emph{today}, even if already in the
1426 convenient formats are strings. Valid such formats include these two, 1426 past. The recognized forms are XXXX, X:XX, or XX:XX (military time),
1427 1427 and XXam, XXAM, XXpm, XXPM, XX:XXam, XX:XXAM XX:XXpm, or XX:XXPM. A
1428 @example 1428 period can be used instead of a colon to separate the hour and minute
1429 @var{year}-@var{month}-@var{day} @var{hour}:@var{min}:@var{sec} @var{timezone} 1429 parts.
1430
1431 @var{hour}:@var{min}:@var{sec} @var{timezone} @var{month}/@var{day}/@var{year}
1432 @end example
1433
1434 @noindent
1435 where in both examples all fields are numbers; the format that
1436 @code{current-time-string} returns is also allowed, and many others
1437 as well.
1438 1430
1439 To specify a relative time as a string, use numbers followed by units. 1431 To specify a relative time as a string, use numbers followed by units.
1440 For example: 1432 For example:
1441 1433
1442 @table @samp 1434 @table @samp
1450 1442
1451 For relative time values, Emacs considers a month to be exactly thirty 1443 For relative time values, Emacs considers a month to be exactly thirty
1452 days, and a year to be exactly 365.25 days. 1444 days, and a year to be exactly 365.25 days.
1453 1445
1454 Not all convenient formats are strings. If @var{time} is a number 1446 Not all convenient formats are strings. If @var{time} is a number
1455 (integer or floating point), that specifies a relative time measured 1447 (integer or floating point), that specifies a relative time measured in
1456 in seconds. 1448 seconds. The result of @code{encode-time} can also be used to specify
1449 an absolute value for @var{time}.
1457 1450
1458 In most cases, @var{repeat} has no effect on when @emph{first} call 1451 In most cases, @var{repeat} has no effect on when @emph{first} call
1459 takes place---@var{time} alone specifies that. There is one exception: 1452 takes place---@var{time} alone specifies that. There is one exception:
1460 if @var{time} is @code{t}, then the timer runs whenever the time is a 1453 if @var{time} is @code{t}, then the timer runs whenever the time is a
1461 multiple of @var{repeat} seconds after the epoch. This is useful for 1454 multiple of @var{repeat} seconds after the epoch. This is useful for