Add a timedelay

Hi -

I’m looking for something that will make a thread do a timedelay.
I can’t find the command.

Two questions…

  1. what is the supported command?
  2. where is the command reference that I could have looked this up?

Thanks!

maybe you can use the “manage delays” feature in scene creation: http://docs5.mios.com/doc.php?language=1&manual=1&platform=3Lite&page=adding_a_scene

Yes , I use them when creating a delay from the front end.

I was hoping to have this delay in a code block.

you can try to use the luup.sleep function, but it has a reliability issue:
http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_sleep
you can work around it by using luup.call_timer:
http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_call_timer

or depending on what you plan to do, maybe you can just use a countdown timer plugin