[Ncr-Python.in] Python , functions to be called after an interval

Narendra Sisodiya narendra at narendrasisodiya.com
Fri Apr 8 23:12:12 CEST 2011


I want to make some function call in python but after some interval,
Like there are 30 functions and I want to call each function at specific
time..

I have found this method -
http://docs.python.org/release/2.5.2/lib/timer-objects.html
Timer object from threading

I will use it, but 2 problem
1) How I can make sure about precision of timer ? I mean, If I say, execute
after 30 second then it should execute after 30 second and not at 29 second.
2) I want to pause also, so right now There is no pause method given, If I
want to pause then I want to pause all 30 functions. I have done this thing
in javascript. when I want to pause then I notedown the elapsed time and
stop the timer, after that I un-pause the execute with the remaining
interval of time. But in threading.Timer, I am unable to find any method to
get elapsed timer. I thing I have to create external timer to pause
facility. may be a wrapper of threading.timer which support timer pause
functionality ...

Need your input..



-- 
┌─────────────────────────┐
│    Narendra Sisodiya
│    http://narendrasisodiya.com
└─────────────────────────┘
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ncr-python.in/attachments/20110409/82283498/attachment.html>


More information about the Ncr-Python.in mailing list