[squeak-dev] #wait is slow

tim Rowledge tim at rowledge.org
Thu Jul 1 17:43:56 UTC 2021



> On 2021-07-01, at 10:18 AM, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
> 
> Hi all,
> 
> I just made an interesting observation:
> 
> [1000 timesRepeat: [0.001 seconds wait]] timeToRun. "--> 2612"

That's because OS tick stuff tends to be very much not what we expect. We've been through a lot of excitement about this over the decades.

As best I remember, unix tends to have issues that effectively limit us to 500 ticks/sec and so the smallest delay is 2mS. Aliasing means you can end up with 'almost 3' I think. Windows used to be really terrible, but who knows, maybe they've improved it since last time? The only OS that made it easy to get actual, precise, regular, ticks is/was RISC OS. Of course pretty much nobody uses that any more.

Strange how "modern serious OSs" manage to do less well.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
If you must choose between two evils, pick the one you've never tried before.




More information about the Squeak-dev mailing list