Less than a Millisecond

Dean_Swan at Mitel.COM Dean_Swan at Mitel.COM
Tue May 9 21:32:05 UTC 2000



From:  Dean Swan at MITEL on 05/09/2000 05:32 PM

>>    Is there a way to measure things that take less than a millisecond?
>
>Yes. Here's a way to do it.
>Andres.

     The code that Andres posted, while very nice, really only measures the mean
execution time of a block, averaged over many executions of the block.

     Squeak itself has no standard way of measuring events that are shorter than
one millisecond in duration.  The resolution of the millisecond clock is not
required to be accurate to the nearest millisecond, so it may be even worse than
it seems.

     This kind of high resolution timing, and the attainable resolution and
accuracy is highly dependent on the host OS and hardware, assuming you want to
measure real events that cannot be estimated by repeated execution and
averaging.

                                   -Dean
                                   dean_swan at mitel.com








More information about the Squeak-dev mailing list