| ID | Creation date | March 19, 2007 | |
| Platform | S60 2nd Edition, S60 3rd Edition | Tested on devices | Nokia N96 |
| Category | Python | Subcategory | Timers |
| Keywords (APIs, classes, methods, functions): e32 |
Many old examples include unsafe use of e32.ao_sleep(). The problem is that the sleep can't be interrupted! It's better to use e32.Ao_timer as explained by following PyS60 Code.
# import module
import e32
# Create a timer
timer = e32.Ao_timer()
while running:
// do something
timer.after(1) # sleep a sec
With above timer can be interrupted before end with following code:
timer.cancel()
No related wiki articles found