diff options
author | Roland McGrath <roland@gnu.org> | 1996-02-07 16:54:50 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-02-07 16:54:50 +0000 |
commit | 0c6be60d2788cd29e633b590d26bd44739b0a942 (patch) | |
tree | 1721aa5562c09f3b836f331bd8ec046b41ecddfe /lisp/timer.el | |
parent | 3a5da8a83f20cc260f3d584936b3e704d529b58e (diff) | |
download | emacs-0c6be60d2788cd29e633b590d26bd44739b0a942.tar.gz |
(run-at-time): Handle numbers as relative times in seconds, as the original
code did.
Diffstat (limited to 'lisp/timer.el')
-rw-r--r-- | lisp/timer.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/timer.el b/lisp/timer.el index 94b681abdf0..adb44db7ca3 100644 --- a/lisp/timer.el +++ b/lisp/timer.el @@ -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))) |