mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
65 lines
958 B
XML
65 lines
958 B
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>second()</name>
|
|
|
|
<category>Input/Output</category>
|
|
|
|
<subcategory>Time & Date</subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image>second_.jar</image>
|
|
<code>
|
|
void loop() {
|
|
background(204);
|
|
int s = second(); // Values from 0 - 59
|
|
int m = minute(); // Values from 0 - 59
|
|
int h = hour(); // Values from 0 - 23
|
|
line(s, 0, s, 33);
|
|
line(m, 33, m, 66);
|
|
line(h, 66, h, 100);
|
|
}
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
Processing communicates with the clock on your computer. The <b>second()</b> function returns the current second as a value from 0 - 59.
|
|
</description>
|
|
|
|
<syntax>
|
|
second
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label></label>
|
|
<description></description>
|
|
</parameter>
|
|
|
|
<returns>int</returns>
|
|
|
|
<related>
|
|
millis()
|
|
second()
|
|
minute()
|
|
hour()
|
|
day()
|
|
month()
|
|
year()
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Function</type>
|
|
|
|
<partof>Core</partof>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|