I create objects with an interval of 2 seconds. I want every let's say 11 seconds the interval between object creation to be 0.5 second. And when there are 3 objects with this frequency, I will set 2 seconds again.
What I'm doing is this:
But on the first 3rd second, 2 extra objects are created. Why? How to get rid of this? And am I controlling the frequency of object creation correctly? Or maybe there is some more rational way?
Thanks!