# HG changeset patch # User Richard M. Stallman # Date 822882412 0 # Node ID c91cf5d2b95f4a0705d3a8d1788c9a4bc47a0a7a # Parent 64e80af54f06578266927c534bc1613ed4920e9c (run-after-delay): Add autoload cookie. Delete USECS arg. Let REPEAT be a float. diff -r 64e80af54f06 -r c91cf5d2b95f lisp/=timer.el --- 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)))