summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/api.texi8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api.texi b/doc/api.texi
index 022c103..cb3c885 100644
--- a/doc/api.texi
+++ b/doc/api.texi
@@ -1271,10 +1271,10 @@ trying to get their mother's attention:
(while #t
(display "mom!")
(newline)
- (wait 60))) ; where 60 = 1 second of real time
+ (sleep 60))) ; where 60 = 1 second of real time
@end example
-This code runs in an endless loop, but the @code{wait} procedure
+This code runs in an endless loop, but the @code{sleep} procedure
suspends the script and schedules it to be run later by the agenda.
So, after each iteration of the loop, control is returned back to the
game loop and the program is not stuck spinning in a loop that will
@@ -1294,7 +1294,7 @@ needs to be shut down. When a script is spawned, a handle to that
script is returned that can be used to cancel it when desired.
@example
-(define script (script (while #t (display "hey\n") (wait 60))))
+(define script (script (while #t (display "hey\n") (sleep 60))))
;; sometime later
(cancel-script script)
@end example
@@ -1333,7 +1333,7 @@ Suspend the current script and pass its continuation to the
procedure @var{handler}.
@end deffn
-@deffn {Procedure} wait @var{duration}
+@deffn {Procedure} sleep @var{duration}
Wait @var{duration} before resuming the current script.
@end deffn