[squeak-dev] Re: Delay time question

Milan Zimmermann milan.zimmermann at sympatico.ca
Sun Mar 2 17:48:38 UTC 2008


On 2008 February 28, 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.

as a comparison, following is squeak 3.9-8 on SuSE 10.3 (2.6.24 kernel):

 [1151]a SortedCollection(530->44 305->1 34->43 21->2 17->45 11->8 11->41 
10->48 10->3 9->42 7->5 6->52 6->4 5->40 2->10 2->11 2->12 2->47 1->7 1->53 
1->828 1->17 1->19 1->26 1->31 1->32 1->36 1->955)

>
> Cheers,
>    - Andreas




More information about the Squeak-dev mailing list