Forum Discussion
kbenson
15 years agoVisitor
Pseudo-code follows:
Your choice as to whether you use roImageCanvas or roScreen.
time = get_current_time_in_ms()
refresh = 100 ' in ms, 10 times a second
targetTime = time
while true
' Pre-compute target time so image download and display doesn't cause unnecessary lag
targetTime = get_current_time_in_ms() + refresh
image = get_image_from_url()
show_image_on_screen(image)
sleepTime = targetTime - get_current_time_in_ms()
' Only sleep if we don't think another image is ready yet
if sleepTime>0 then sleep(sleepTime)
end while
Your choice as to whether you use roImageCanvas or roScreen.