I had problems to get decent precision using timer.performWithDelay() and I was only able to trigger a function twice per second at the fastest.
Then I read: http://spiralcodestudio.com/corona-sdk-pro-tip-of-the-day-33/
I tested with a main.lua looking like this:
====
local lastTime = system.getTimer()
local function enterFrame()
local now = system.getTimer()
print("last: " … tostring(now - lastTime))
lastTime = now
end
Runtime:addEventListener(“enterFrame”, enterFrame)
====
Then I got this in the simulator console:
nov. 26 11:38:58.203 last: 613.406
nov. 26 11:38:58.908 last: 704.866
nov. 26 11:38:59.488 last: 580.402
nov. 26 11:38:59.926 last: 437.98
nov. 26 11:39:00.678 last: 752.353
nov. 26 11:39:01.529 last: 850.662
nov. 26 11:39:02.220 last: 691.133
nov. 26 11:39:03.001 last: 780.807
nov. 26 11:39:03.737 last: 736.13
nov. 26 11:39:04.457 last: 718.099
nov. 26 11:39:05.059 last: 603.991
That means 0.5-2fps
Depressing
I must be doing something very wrong or most probably being a total noob.
I use a MacBook Air (1,6 GHz Intel Core i5, 8 GB 1600 MHz DDR3, Intel HD Graphics 6000 1536 MB)
/Joakim