Skip to main content

Module timer

Module timer 

Source
Expand description

A monotonic tick counter.

OffsetRegisterBehaviour
0..3TICKSThe count, as three trytes forming a word. Read-only.
3..6COMPARERaise an interrupt once the count reaches this. Zero disarms.

Occupying three trytes means an ordinary lw at the timer base reads the whole count.

The counter is advanced by the host rather than by a wall clock, so runs are reproducible. Bus::tick advances it once per executed instruction.

Structs§

Timer
A tick counter.

Constants§

COMPARE
Offset of the first tryte of the compare register.
TICKS
Offset of the first tryte of the tick count.