]> git.eshelyaron.com Git - emacs.git/commitdiff
(run-at-time): Handle numbers as relative times in seconds, as the original
authorRoland McGrath <roland@gnu.org>
Wed, 7 Feb 1996 16:54:50 +0000 (16:54 +0000)
committerRoland McGrath <roland@gnu.org>
Wed, 7 Feb 1996 16:54:50 +0000 (16:54 +0000)
code did.

lisp/timer.el

index 94b681abdf0b910af1f0aae75e827bf3cbd8bcaf..adb44db7ca3c943ca94835e654a42e0af2f337b4 100644 (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)))