forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelay.xml
More file actions
executable file
·53 lines (32 loc) · 1.21 KB
/
Copy pathdelay.xml
File metadata and controls
executable file
·53 lines (32 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>delay()</name>
<category>Structure</category>
<subcategory></subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
int pos = 0;
void draw() {
background(204);
pos++;
line(pos, 20, pos, 80);
delay(250); // Stops the program for 250 milliseconds
}
]]></code>
</example>
<description><![CDATA[Forces the program to stop running for a specified time. Delay times are specified in thousandths of a second, therefore the function call <b>delay(3000)</b> will stop the program for three seconds. Because the screen is updated only at the end of <b>draw()</b>, the program may appear to "freeze", because the screen will not update when the <b>delay()</b> method is used. This function has no affect inside <b>setup()</b>.<br/><br/>]]></description>
<syntax><![CDATA[
delay(<kbd>milliseconds</kbd>)
]]></syntax>
<parameter>
<label>milliseconds</label>
<description><![CDATA[int: specified as milliseconds (there are 1000 milliseconds in 1 second)]]></description>
</parameter>
<returns>None</returns>
<related></related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
</root>