over time.sleep. AO stands for 'Active Object' approach to
cooperative multi-tasking. When an object go to 'ao_sleep'
other active objects can run.
import e32 e32.ao_sleep(5) # sleep for 5 seconds
There is another usage ao_sleep(interval, callback)
where ao_sleep will return immediately but the callback
will be called after the interval (in another thread?)
This could be used to create a repeat loop for every interval.
I show this in a previous snippet.
import e32, time def showtime(): print time.clock() e32.ao_sleep(1, showtime) # sleep then call itself again showtime() # start the loop