×
Namespaces

Variants
Actions
(Redirected from How to create a timer)

Archived:How to create a timer in PySymbian

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: 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 (31 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 31 May 2013, at 04:08.
54 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×