It looks like you're new here. If you want to get involved, click one of these buttons!
I know Codea is limited knowing the accurate time in milliseconds, is there a workaround?
Maybe if Codea knows real time in seconds, a program could "learn" to calculate when the next second is coming in...
The "EslapsedTime" is deprecated?
Comments
I am dumb.... Weeks figuring why.... Is ElapsedTime... Not ESlapsedTime....
[/Thread]
Codea measures in frames (60 frames per second) so that can be used to figure out when the next second is coming
@Doge The speed of draw() varies depending on the amount of objects are on the screen. So frames vary from 60 FPS to below 1 FPS, which make it useless for accurate time.
There's also the
os
time functions which can be used for more accurate timings.os.clock() will give you CPU time in fractions of a second. If you need a quick time difference, that might work. os.time() will give you seconds and should be use over a longer time period.
i managed to sync a flashing image to a music's beat, the sync would not be lost but the accuracy is medium... I will post an example...
Here an example of music sync: