sleep(args) in lua

I have a function:

local function lamp\_tap(event) --some code... points\_text.text = "all points: " .. points --here I need sleep(or something like that) \<\<----- !!!!!!!!! clear\_lamps(6)--also functions randomize(6) --some code... end

what I need: stop program for some time (so user can se the results) . I tried to find information in internet, but… something went wrong.

Use timer.performWithDelay, or better yet, just make a button that the user needs to touch when they are ready and clear the display objects once the button is touched.

I’ve heard about timer.performWithDelay(). And this thing is quite strange…

I need

local timer = require ("timer")&nbsp;

?

https://docs.coronalabs.com/api/library/timer/performWithDelay.html

Corona has a lot of extra ‘global’ methods you can call which you won’t find in general Lua documentation. You need to study the Corona API docs to find out everything that is possible.

https://docs.coronalabs.com/api/library/index.html

Use timer.performWithDelay, or better yet, just make a button that the user needs to touch when they are ready and clear the display objects once the button is touched.

I’ve heard about timer.performWithDelay(). And this thing is quite strange…

I need

local timer = require ("timer")&nbsp;

?

https://docs.coronalabs.com/api/library/timer/performWithDelay.html

Corona has a lot of extra ‘global’ methods you can call which you won’t find in general Lua documentation. You need to study the Corona API docs to find out everything that is possible.

https://docs.coronalabs.com/api/library/index.html