[squeak-dev] Re: Delay time question

Robert F. Scheer rfscheer at speakeasy.net
Thu Feb 28 07:11:42 UTC 2008


Very nice method.

My results are  "a SortedCollection(937->1 26->16 15->14 11->13 10->15
1->3)"

I thought the 2.6.20 series of Linux kernels had greatly improved the
timer issues in a big push to make multimedia applications behave well
on the desktop, which they do now quite well.

- Robert

On Wed, 2008-02-27 at 21:37 -0800, Andreas Raab wrote:
> Robert F. Scheer wrote:
> > Is this behavior well-known and understood or is there something wrong
> > with my install?
> 
> This is a very well known issue. Different operating systems have very 
> different minimal timer resolutions. Generally speaking, on Windows and 
> Mac OS the timer resolution is very close to 1ms whereas most Linux 
> kernels have *awful* timer resolutions. I have been told that you can 
> recompile your kernel to fix it but I'm not sure how. The classic 
> benchmark to verify your timer accuracy is to do something like here:
> 
> 	delay := Delay forMilliseconds: 1.
> 	bag := Bag new.
> 	1000 timesRepeat:[bag add: [delay wait] timeToRun].
> 	bag sortedCounts
> 
> On my box it yields "a SortedCollection(941->1 51->2 8->3)" which means 
> that 94.1% of the delays are true 1msec delays.
> 
> Cheers,
>    - Andreas
> 
> 




More information about the Squeak-dev mailing list