How to create a setInterval kind of thing in roku

Hi All,

Does any one have any idea on how we can achieve something like setInterval in roku?

Regards,
Prajwal

Assuming you mean that you want to execute a function periodically, see the “Timed events” section in the Event Loops documentation.

–Mark

One way to approach it: Basically while your main loop is running, have a roTimespan counting up, and check it every loop. Once it’s as large as you want (seconds or milliseconds), do what you want and reset the counter to 0.