While the program works better with coroutines implemented (it has fewer hiccups on startup and chunk reloading), I had to abandon full implementation of coroutines because of the http.get() command. I use this line of code to refresh the time from http://www.timeapi.org:
time[i].time=(http.get("http://www.timeapi.org/"..(time[i].zone).."/now?format=%25l:%25M%20%25p").readAll())
The code is correct, and it does properly refresh the time values I am displaying. However, using http.get() appears to cause the coroutine to yield, although I did not expect this behavior. I had to move this code out of the coroutine and into its own function (refreshTime() in my program). As a result, my code does not really take full advantage of coroutines.
I do not want to repeat the post of my code here, so instead I will link to the pastebin: http://pastebin.com/AUQfZjRK
Am I doing something wrong?
Edited by surferpup, 30 January 2014 - 01:54 AM.











