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: 
jbrave
Channel Surfer

Wait(1000,port)

Anything to keep in mind if I choose to iterate vs wait in my main message loop?

So far seems to work just fine this way...
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
3 REPLIES 3
TheEndless
Channel Surfer

Re: Wait(1000,port)

Iterate what? If, as your title suggests, you mean Wait with a timeout of one second, then that works fine, but you'll want to check to make sure your msg isn't invalid.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
jbrave
Channel Surfer

Re: Wait(1000,port)

Iterate I mean loop through with out blocking at the wait - If i understand correctly msg=wait(0,port) will sit there forever till it gets a message, whereas wait (1000,port) will wait 1 second then continue on through the if / then.
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
TheEndless
Channel Surfer

Re: Wait(1000,port)

That's correct. No problem with that. That's how I do it in almost all of my channels, because I use the invalid messages (timeout) to perform other tasks, like refreshing the screen or incrementing duration.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
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.