clock

An input that flips itself: a square wave with period: from one rising edge to the next, ticking while the circuit is on screen. The reader pauses and restarts it by clicking it, and a paused clock shows ‖ beside its level. A cue starts or stops it through running:. For a clock the reader steps by hand, use a switch.

clockNode
A clock driving a lamp, both at 0, with the clock labelled CLK.A clock driving a lamp, both at 0, with the clock labelled CLK.

#Attributes

period
From one rising edge to the next.
Default1s
value
The level it starts at, 0 or 1.
Default0
runningAnimatable
Whether it ticks. Animatable, so a cue can start or stop it.
Defaulttrue
hiddenAnimatable
Declared but not drawn, and taking no room while hidden. Animatable.
Defaultfalse

#Derived attributes

Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.

levelDerived
Its level now, 0 or 1.

#Allowed content

Body { }The clock's label, rich inline

#Allowed in

#Examples

clock#clk{CLK}(period: 2s)

Last updated