1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-26 10:49:33 +00:00

(run-at-time): Handle numbers as relative times in seconds, as the original

code did.
This commit is contained in:
Roland McGrath 1996-02-07 16:54:50 +00:00
parent 3a5da8a83f
commit 0c6be60d27

View File

@ -189,6 +189,10 @@ This function returns a timer object which you can use in `cancel-timer'."
(if (null time)
(setq time (current-time)))
;; Handle numbers as relative times in seconds.
(if (numberp time)
(setq time (timer-relative-time (current-time) time)))
;; Handle relative times like "2 hours and 35 minutes"
(if (stringp time)
(let ((secs (timer-duration time)))