In reply to sumanth291092:
- what is your definition of “clocks are active are not?”
Toggling for ever until state changes? - periods of the clock for each of the states?
I would approach this with separate concurrent tasks or fork-join task.
Have to think about it after I know more requirements.