Are timer.performwithDelay and transition.to timers in sync?

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 

imagine that timer.performWithDelay were instead named “timer.performAtTheNextFrameThatOccursAfterAtLeastThisMuchDelay”

then you’d perhaps get a better clue as to what’s going on internally.  your timer is not firing every millisecond, it’s occurring once on the next frame after the delay, then restarting itself to do the same again (indefinitely).  so your “tick” variable is essentially counting frames, not milliseconds.

your 4000ms and 200-300 frame ticks works out to about 16ms/tick (using an average of 250, 4000/250=16), which equates to 60 frames per second.  (at least to the accuracy given – 16.66666ms idealized = 60fps)

Thank you! That cleared it out. And yes the app is running at 60fps. Last night I saw the exact value to be 259 ticks. 

I saw an event called enterFrame which I think better suits what I’m trying to do now. 

imagine that timer.performWithDelay were instead named “timer.performAtTheNextFrameThatOccursAfterAtLeastThisMuchDelay”

then you’d perhaps get a better clue as to what’s going on internally.  your timer is not firing every millisecond, it’s occurring once on the next frame after the delay, then restarting itself to do the same again (indefinitely).  so your “tick” variable is essentially counting frames, not milliseconds.

your 4000ms and 200-300 frame ticks works out to about 16ms/tick (using an average of 250, 4000/250=16), which equates to 60 frames per second.  (at least to the accuracy given – 16.66666ms idealized = 60fps)

Thank you! That cleared it out. And yes the app is running at 60fps. Last night I saw the exact value to be 259 ticks. 

I saw an event called enterFrame which I think better suits what I’m trying to do now.