clock

An input to a logic circuit that flips itself, as a square wave.

clockNode
On this page
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
The time from one rising edge to the next.
Default1s
value
The level it starts at, 0 or 1.
Default0
runningAnimatable
Whether it ticks.
Defaulttrue
hiddenAnimatable
Declared but not drawn, and taking no room while hidden.
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)

#Notes

  • It ticks while the circuit is on screen.
  • The reader pauses and restarts it by clicking it; a paused clock shows ‖ beside its level.
  • A clock the reader steps by hand is a switch.
  • The reader pauses and restarts it by clicking it.

Last updated