Clock/en: Difference between revisions

From StarLogo Nova Wiki
(Updating to match new version of source page)
 
(Updating to match new version of source page)
Line 3: Line 3:
<section begin=image/>
<section begin=image/>
[[File:Clock.png|alt=Clock|thumb]]
[[File:Clock.png|alt=Clock|thumb]]
<section end=image/>
<section end=image/><p id="tooltip">Returns the value of the clock, measured in “ticks”. This value increments by 1 during each iteration of the code, which is 5x per second at normal speed.</p>
 
<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.


== 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>
<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.


===Syntax===
===Syntax===

Revision as of 15:03, 8 August 2023

Other languages:


Clock

Returns the value of the clock, measured in “ticks”. This value increments by 1 during each iteration of the code, which is 5x per second at normal speed.

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.

Nuances

Related Blocks