From 6eccb1070de640e6bfdef46ba4c4d96cfaa375b8 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 27 Oct 2017 12:07:09 -0400 Subject: doc: scripting: Replace references to "wait" with "sleep". --- doc/api.texi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/api.texi') 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 -- cgit v1.2.3