Precise timing in Python?

Peter Hansen peter at engcorp.com
Mon Nov 20 23:44:07 EST 2000


Paul Winkler wrote:
> I tend to forget because for most of the stuff I'm interested in-
> audio dsp with small buffer sizes giving < 10 ms latency -
> those solutions seem like overkill given the recent developments I
> mentioned.
> "overkill" because it's a lot more work (at least in RTLinux, which
> I've heard about a bit; I am ignorant of QNX), and those systems are
> designed for situations where the requirements get down to
> microseconds rather than milliseconds. Bror mentioned maximum error of
> 0.03 seconds so I thought he'd be fine without a true RT OS.

There's a slight but important difference between most audio DSP stuff
I've seen (but not all!) and most "real-time" stuff I've seen,
especially when somebody talks about machine control and avionics
testing.  

With the audio stuff, the odd hiccup of a few milliseconds beyond your
jitter requirements leads, maybe, to a minor glitch in what somebody
hears, possibly buried in the rest of the signal anyway.  With machine
control, or testing, your system could break something physical or
perhaps falsely fail an entire series of tests, leading to scrap parts
or significant wasted time and resulting cost.  Or worse, accidentally
pass a failing component because the test system missed a real failure.

Not that I'm saying audio stuff isn't real-time, but it's generally a
little softer than industrial control.  If Bror really wants 0.03 *max*,
I'd recommend a true RT OS.  (In fact, I already did! :-)



More information about the Python-list mailing list