1 more speed question
Dar Scott
dsc at swcp.com
Thu May 19 12:39:56 EDT 2005
On May 19, 2005, at 1:00 AM, Mark Wieder wrote:
> on mouseUp
> local elapsedTime, x, y, z
>
> put the milliseconds into elapsedTime
> put the number of controls on card id 200593 of stack "revIcons"
> into y
> repeat 1000 times
> repeat with x=1 to y
> add 1 to z
> end repeat
> end repeat
> put the milliseconds - elapsedTime into field "fldResult1"
> end mouseUp
Shouldn't the 'put the number of...' be inside your timer loop?
In my mind we are comparing...
put the number of controls on card id 200593 of stack "revIcons"
into y
repeat with x=1 to y
add 1 to z
end repeat
...with this:
repeat with x=1 to the number of controls on card id 200593 of
stack "revIcons"
add 1 to z
end repeat
Also, since the button is being redrawn, I put a 'wait .2 seconds' at
the top of timing mouseUp handlers. Maybe that is superstition.
Dar
--
**********************************************
DSC (Dar Scott Consulting & Dar's Lab)
http://www.swcp.com/dsc/
Programming and software
**********************************************
More information about the use-livecode
mailing list