Clock: Difference between revisions
No edit summary |
(Marked this version for translation) |
||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | |||
<section begin=image/> | <section begin=image/> | ||
[[File:Clock.png|alt=Clock|thumb]] | [[File:Clock.png|alt=Clock|thumb]] | ||
Line 7: | Line 8: | ||
<section begin="name" />'''<code>clock</code>'''<section end="name" /> is a [[code block]] part of the [[Environment]] drawer. | <section begin="name" />'''<code>clock</code>'''<section end="name" /> is a [[code block]] part of the [[Environment]] drawer. | ||
<!--T:2--> | |||
== Usage== | == Usage== | ||
<p><code>clock</code> refers to the value of the clock, measured in “ticks”. This value increments by 1 after each iteration of the code. The speed that the clock increments is determined by the value of the engine speed slider. A slider value of n makes the clock tick n times per second. The clock starts at zero when the program is initiated.</p> | <p><code>clock</code> refers to the value of the clock, measured in “ticks”. This value increments by 1 after each iteration of the code. The speed that the clock increments is determined by the value of the engine speed slider. A slider value of n makes the clock tick n times per second. The clock starts at zero when the program is initiated.</p> | ||
===Syntax=== | ===Syntax=== <!--T:3--> | ||
<!--T:4--> | |||
<code>[Textbox Insert] clock</code> | <code>[Textbox Insert] clock</code> | ||
<!--T:5--> | |||
==Common Uses== | ==Common Uses== | ||
Mainly used to simulate the passing of time in simulations, and to prompt certain actions to take place during certain points in time. | Mainly used to simulate the passing of time in simulations, and to prompt certain actions to take place during certain points in time. | ||
==Nuances== | ==Nuances== <!--T:6--> | ||
<!--T:7--> | |||
==Related Blocks== | ==Related Blocks== | ||
*<code>[[Set Clock To|set clock to [_]]]</code> | *<code>[[Set Clock To|set clock to [_]]]</code> |
Revision as of 14:48, 27 June 2023
clock
is a code block part of the Environment drawer.
Usage
clock
refers to the value of the clock, measured in “ticks”. This value increments by 1 after each iteration of the code. The speed that the clock increments is determined by the value of the engine speed slider. A slider value of n makes the clock tick n times per second. The clock starts at zero when the program is initiated.
Syntax
[Textbox Insert] clock
Common Uses
Mainly used to simulate the passing of time in simulations, and to prompt certain actions to take place during certain points in time.