| Home | Trees | Indices | Help |
|
|---|
|
|
Multithreading class that wraps Python threading.Thread. Specifically, this class implements the timed function execution concept. It means that you can run timed functions (say every N seconds) and control its execution through another (main?) thread.
It is possible to set arbitrary, variable, delays and decide if to delay before or after the execution of the function provided at construction time. Timed function can be stopped by calling TimeScheduled.kill() method. You may find the example below more exhaustive:
>>> from entropy.misc import TimeScheduled >>> time_sched = TimeSheduled(5, print, "hello world", 123) >>> time_sched.start() hello world 123 # every 5 seconds hello world 123 # every 5 seconds hello world 123 # every 5 seconds >>> time_sched.kill()
| Instance Methods | |||
| None |
|
||
| None |
|
||
| None |
|
||
| None |
|
||
|
|||
|
|||
|
Inherited from Inherited from |
|||
| Properties | |
|
Inherited from |
| Method Details |
TimeScheduled constructor.
|
Change current delay in seconds.
|
Set whether delay before the execution of the function or not.
|
Set whether delay function must be accurate or not.
|
This method is called automatically when start() is called. Don't call this directly!!!
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Aug 5 16:58:56 2009 | http://epydoc.sourceforge.net |