towards an accurate delay....

Andreas Raab Andreas.Raab at gmx.de
Mon Mar 11 14:16:19 UTC 2002


John,

> How come that 20ms delay took 28ms?

Yup, that's exactly the question I've asked myself when it came to
implement accurate delays.

> So were does all this lead?
> Well if you want a millisecond accurate delay, then we need another 
> way of doing it, versus looking at the clock every millisecond. Hint 
> OS timers come to mind.
> Then again do we care?

At times, we do (or else I wouldn't have bothered looking into this
issue at all ;-) The best solution I came up with was to exploit native
timer services and then reset the interrupt check counter in order to
force an interrupt check. The speed loss is almost neglectable (I
measured below 1%) which is a number I am willing to trade for accurate
timing behavior.

Cheers,
  - Andreas





More information about the Squeak-dev mailing list