aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2022-08-14 10:41:40 -0400
committerStefan Monnier2022-08-14 10:41:40 -0400
commit397fdc22eb140dd80e878528fd65e74da4033fa8 (patch)
tree6deb697e389789406e0a0a181ca6292ae56829bb /src
parentd28f1677c3bdd7c1b20af59e7cc5460616f8e7e9 (diff)
downloademacs-397fdc22eb140dd80e878528fd65e74da4033fa8.tar.gz
emacs-397fdc22eb140dd80e878528fd65e74da4033fa8.zip
* lisp/calendar/time-date.el (seconds-to-time): Use the original arg list
Diffstat (limited to 'src')
-rw-r--r--src/timefns.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/timefns.c b/src/timefns.c
index 7db50ea81cc..edfd73e9b80 100644
--- a/src/timefns.c
+++ b/src/timefns.c
@@ -401,6 +401,10 @@ decode_float_time (double t, struct lisp_time *result)
401 else 401 else
402 { 402 {
403 int scale = double_integer_scale (t); 403 int scale = double_integer_scale (t);
404 /* FIXME: `double_integer_scale` often returns values that are
405 "pessimistic" (i.e. larger than necessary), so 3.5 gets converted
406 to (7881299347898368 . 2251799813685248) rather than (7 . 2).
407 On 64bit systems, this should not matter very much, tho. */
404 eassume (scale < flt_radix_power_size); 408 eassume (scale < flt_radix_power_size);
405 409
406 if (scale < 0) 410 if (scale < 0)
@@ -1717,8 +1721,6 @@ DEFUN ("time-convert", Ftime_convert, Stime_convert, 1, 2, 0,
1717 doc: /* Convert TIME value to a Lisp timestamp of the given FORM. 1721 doc: /* Convert TIME value to a Lisp timestamp of the given FORM.
1718Truncate the returned value toward minus infinity. 1722Truncate the returned value toward minus infinity.
1719 1723
1720If FORM is nil, return the same form as `current-time'.
1721
1722If FORM is a positive integer, return a pair of integers (TICKS . FORM), 1724If FORM is a positive integer, return a pair of integers (TICKS . FORM),
1723where TICKS is the number of clock ticks and FORM is the clock frequency 1725where TICKS is the number of clock ticks and FORM is the clock frequency
1724in ticks per second. 1726in ticks per second.
@@ -1731,9 +1733,14 @@ If FORM is `integer', return an integer count of seconds.
1731If FORM is `list', return an integer list (HIGH LOW USEC PSEC), where 1733If FORM is `list', return an integer list (HIGH LOW USEC PSEC), where
1732HIGH has the most significant bits of the seconds, LOW has the least 1734HIGH has the most significant bits of the seconds, LOW has the least
1733significant 16 bits, and USEC and PSEC are the microsecond and 1735significant 16 bits, and USEC and PSEC are the microsecond and
1734picosecond counts. */) 1736picosecond counts.
1737
1738If FORM is nil, the behavior depends on `current-time-list',
1739but new code should not rely on it. */)
1735 (Lisp_Object time, Lisp_Object form) 1740 (Lisp_Object time, Lisp_Object form)
1736{ 1741{
1742 /* FIXME: Any reason why we don't offer a `float` output format option as
1743 well, since we accept it as input? */
1737 struct lisp_time t; 1744 struct lisp_time t;
1738 enum timeform input_form = decode_lisp_time (time, false, &t, 0); 1745 enum timeform input_form = decode_lisp_time (time, false, &t, 0);
1739 if (NILP (form)) 1746 if (NILP (form))