Precise timing in Python?

Bror Johansson bror.johansson at esavionics.se
Tue Nov 14 03:55:45 EST 2000


I'm considering to use Python for an application that shall - among other
things - stimulate some external equipment (via an I/O-card on the PCI-bus)
with a frequency of 10 Hz.

This frequency should be kept very close to 10 Hz, i.e. in the long run (~10
hours or so) it must average to 10 +- 0.05 Hz.

The 'distance' between any two consecutive 'ticks' shall be 0.1 +- 0.03
seconds.

I think signal.alarm() is not good enough, is it?.

Could 'stackless python' with microthreads be a viable option?

Are there any other possibilities, or do I have to abandon Python for this
application?

TIA
Bror Johansson





More information about the Python-list mailing list