Software counters are used as the basis for the implementation of timeouts. When a timeout or delay is set, the current value of the relevant software counter will be added to the requested delay time and stored in a variable, using a defined macro,
INSTALL_TIMEOUT
. By default, MicroC relates to the primary software counter defined in the compilation profile.Other software counters can be referenced using an optional third argument in the timeout operator. The name of the counter is as written in the model, using the syntax:
where
myCounter
is the name of the counter. Each counter receives an index value defined as <counter_name>_INDEX. The index value identifies that specific counter in the application.