Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Deepaks3
Binge Watcher

Is there a way to execute a function in interval of 10 sec in background.

I have a scenario where i have to update my screen in every 10 sec of interval functionality will work execute in background.

It is similar to the function setinterval in javascript.

 

0 Kudos
1 REPLY 1
sanity-check
Roku Guru

Re: Is there a way to execute a function in interval of 10 sec in background.

'Timer' is probably what you want:

https://developer.roku.com/en-gb/docs/references/scenegraph/control-nodes/timer.md

 

You can do 'createObject("roSGNode", "Timer")' which often makes more sense than making the node in XML. As far as I can tell it doesn't need to be added to the scene as a child node to work.

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.