So I have an infinite timer set up in the following format:
t1 = timer.performWithDelay(1,timerDown,-1)
In theory this function should call timerDown() every 1 millisecond.
On some other parts of my code I have a transition.to() function with a time=4000milliseconds which moves an object from top to bottom of my screen. Which kinda looks like this:
ticks = 0 transition.to(object,{time=4000,y=display.contentHeight,onComplete=printticks}) function timerDown() ticks = ticks + 1 end
Now the boggling thing I can’t wrap my head in is when I placed a print function on the onComplete event of the transition the ticks is way lower than 4000. Something around 200-300. If I’m getting this correctly shouldn’t the tick value be 4000?
Just discovered this as I was trying to set some code for an object spawning function which is triggered inside the timerDown function and the number of ticks.
Hope someone could shed some light on this. Thank you