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