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 | b01d6047b47d9a473eb73048f5401161266c97cf (patch) | |
tree | d1d5540b9b139116a43c8df4e3c4c9505e77040d | |
parent | 341da10513324ac54be58dd90ed3affd5ad92136 (diff) | |
download | emacs-b01d6047b47d9a473eb73048f5401161266c97cf.tar.gz |
(run-at-time): Handle numbers as relative times in seconds, as the original
code did.
-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))) |