[Q]Timing morphic

Joshua 'Schwa' Gargus schwa at cc.gatech.edu
Wed Aug 6 22:09:14 UTC 2003


[self changed. World doOneCycleNow] timeToRun

would be better, because your version may include an inter-cycle
pause.  I thought about:

World doOneCycleNow. [self changed. World doOneCycleNow] timeToRun

to avoid timing anomalies caused by queued events, display updates,
etc., but the difference was negligible.

It really depends on what you are trying to measure.  For example, you
might call 'anEllipseMorph changed' and want to measure how long it
takes to redraw.  However, the ellipse might be above some complex 
morph that takes a much longer time to redraw; in this case the snippets
we've discussed will be misleading.

Joshua

On Wed, Aug 06, 2003 at 11:45:00PM +0200, Karl Ramberg wrote:
> How do I go about timing a message sent to a morph, say 'self changed' ?
> I want time the whole process till the morph is redrawn.
> 
> [self changed] timeToRun ->0 or 1 "Morphic is not that snappy!"
> 
> or
> 
> [self changed. World doOneCycle] timeToRun -> 180 "More like it, but is
> this the way to do it?"
> 
> 
> Karl



More information about the Squeak-dev mailing list