Pausing, waiting question

Hey. From Roblox.Lua I got used to wait(sec) function. Is there any way to simplify waiting in Corona?
In example, I need a function to be repeated every 300ms, so it looks something like this:

for i = 1, 10 do

wait(300) – ms

functionFire()

end

I tried using timer.performWithDelay() but instead of pausing (waiting) it just skipped the time. Help?

perhaps this :

timer.performWithDelay(300,functionFire,10)

It began after 300 milliseconds, call the function, wait 300 ms, recalls, etc … 10 times.

Hi there,

Using Coroutine might be the best option for this.

Coroutine can be in one of three different states: suspended, running, and dead.

https://coronalabs.com/blog/2015/02/10/tutorial-using-coroutines-in-corona/

Kindly,

Assif

perhaps this :

timer.performWithDelay(300,functionFire,10)

It began after 300 milliseconds, call the function, wait 300 ms, recalls, etc … 10 times.

Hi there,

Using Coroutine might be the best option for this.

Coroutine can be in one of three different states: suspended, running, and dead.

https://coronalabs.com/blog/2015/02/10/tutorial-using-coroutines-in-corona/

Kindly,

Assif