Skip to content

Commit 68cc488

Browse files
committed
Merge branch 'master' into xml-methods
2 parents b30a200 + 27ba52c commit 68cc488

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Reference/api_en/delay.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<root>
3+
<name>delay()</name>
4+
5+
<category>Environment</category>
6+
7+
<subcategory></subcategory>
8+
9+
<example>
10+
<notest />
11+
<noimage />
12+
<code><![CDATA[
13+
def draw():
14+
line(random(100), random(100), random(100), random(100))
15+
delay(1000)
16+
]]></code>
17+
</example>
18+
19+
<description><![CDATA[
20+
The delay() function halts for a specified time. Delay times are specified in thousandths of a second. For example, running delay(3000) will stop the program for three seconds and delay(500) will stop the program for a half-second.<br />
21+
<br />
22+
The screen only updates when the end of draw() is reached, so delay() cannot be used to slow down drawing. For instance, you cannot use delay() to control the timing of an animation.
23+
]]></description>
24+
25+
<syntax>
26+
delay(<c>time</c>)
27+
</syntax>
28+
29+
<parameter>
30+
<label>time</label>
31+
<description><![CDATA[int: milliseconds to pause before running draw() again]]></description>
32+
</parameter>
33+
34+
<related>frameRate_var</related>
35+
<related>draw</related>
36+
37+
</root>

0 commit comments

Comments
 (0)