Namespaces
Variants
Actions
(Redirected from How to create a timer)

Archived:How to create a timer in PySymbian

Jump to: navigation, search
Archived.png
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.


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)

Reference Link

This page was last modified on 8 May 2013, at 08:23.
266 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved