Generates a timer function that returns True periodically every so many periods.
Parameters
n — int, required
The length of the interval between
Trueperiods. For example,n=2would returnTrueon even periods.offset — int, optional
Shifts the periodicity of the interval. For example,
n=2andoffset=1would returnTrueon odd periods.Default value: 0
Return Value — func(int)
A timer function that takes the model time and returns a boolean.
Notes and Examples