summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-01-29 02:26:52 +0000
committerRichard M. Stallman <rms@gnu.org>1996-01-29 02:26:52 +0000
commita3f7b59d4d6ed96b10ad970317b10dae22089406 (patch)
treefb4dd4092ca873bd547c7cd3ace975fa71066ec6
parent9d2c045729d327048af4636b58afbbe64d80018d (diff)
downloademacs-a3f7b59d4d6ed96b10ad970317b10dae22089406.tar.gz
(run-after-delay): Add autoload cookie.
Delete USECS arg. Let REPEAT be a float.
-rw-r--r--lisp/=timer.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/=timer.el b/lisp/=timer.el
index 406c8ba8f41..3b468023437 100644
--- a/lisp/=timer.el
+++ b/lisp/=timer.el
@@ -200,19 +200,21 @@ the call to the function. If REPEAT is nil or 0, call it just once."
(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)))