changeset 14403:c91cf5d2b95f

(run-after-delay): Add autoload cookie. Delete USECS arg. Let REPEAT be a float.
author Richard M. Stallman <rms@gnu.org>
date Mon, 29 Jan 1996 02:26:52 +0000
parents 64e80af54f06
children cba05f90ee57
files lisp/=timer.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/=timer.el	Mon Jan 29 02:19:30 1996 +0000
+++ b/lisp/=timer.el	Mon Jan 29 02:26:52 1996 +0000
@@ -200,19 +200,21 @@
     (timer-set-function timer function args)
     (timer-activate timer)))
 
-(defun run-after-delay (secs usecs repeat function &rest args)
-  "Perform an action after a delay of SECS seconds and USECS microseconds.
+;;;###autoload
+(defun run-after-delay (secs repeat function &rest args)
+  "Perform an action after a delay of SECS seconds.
 Repeat the action every REPEAT seconds, if REPEAT is non-nil.
+SECS and REPEAT need not be integers.
 The action is to call FUNCTION with arguments ARGS."
   (interactive "sRun after delay (seconds): \nNRepeat interval: \naFunction: ")
 
   (or (null repeat)
-      (natnump repeat)
+      (and (numberp repeat) (>= repeat 0))
       (error "Invalid repetition interval"))
 
   (let ((timer (timer-create)))
     (timer-set-time timer (current-time))
-    (timer-inc-time timer secs usecs)
+    (timer-inc-time timer secs)
     (timer-set-function timer function args)
     (timer-activate timer)))