(sort of) deterministic timing in Python
John Fisher
johnmfisher at comcast.net
Mon Aug 13 18:16:01 EDT 2007
I am working on a framework for data acquisition in Python 2.5, am
trying to get a structure going more like this:
mark start time
start event
event finishes
count time until next interval
start second event…
rather than this:
start event
event finishes
sleep for interval
start second event
Do you see the difference? I get a true fixed interval from the first,
including the time to accomplish the event task(s). In the second case,
the sleep just gets tacked on at the end of the events, not very
deterministic (timing-wise).
So how do I accomplish this in Python with a minimum of labour?
Thanks for any light you can shed on my darkness...
wave_man
More information about the Python-list
mailing list