From 0c6be60d2788cd29e633b590d26bd44739b0a942 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 7 Feb 1996 16:54:50 +0000 Subject: [PATCH] (run-at-time): Handle numbers as relative times in seconds, as the original code did. --- lisp/timer.el | 4 ++++ 1 file changed, 4 insertions(+) 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))) -- 2.39.2