Archived:How to create a timer in PySymbian
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
The article is believed to be still valid for the original topic scope.
The article is believed to be still valid for the original topic scope.
Article Metadata
Tested with
Devices(s): Emulator, N73
Compatibility
Platform(s): S60
Platform Security
Capabilities: )
Article
Keywords: e32
Created: User:Kandyfloss
(19 Apr 2008)
Last edited: hamishwillee
(08 May 2013)
Here is a code snippet that is useful for creating a timer in Python. A timer can call a function repeatedly after a specific delay, as configured.
Code Snippet
#importing the library using import command
import e32
timer = e32.Ao_timer()
#delay is set to 4.0
delay = 4.0
#defining a function
def do_something(arg=None):
# your code to be repeated every interval goes here
timer.after(delay, do_something)
# To start the timer once
timer.after(delay, do_something)


24 Sep
2009
29 Aug
2010
I don't know the signature of the function to be called differs according to the version of the API but on my Nokia N73 running version 1.4.2 final the function must take a single argument.