Timing (was wordOffset, repeat loop, speed?)
Dar Scott
dsc at swcp.com
Sun Jan 5 16:49:01 EST 2003
On Sunday, January 5, 2003, at 02:18 PM, Mark Brownell wrote:
> All I need is a timer message for start of loop and end of loop to do
> timing
> comparisons. I don't suppose it's "put the ticks" or "startTimer" &
> "put the
> timer" ? This is so amazing. I get to learn a new language that seems
> almost
> the same as one that I already know. What about books? I was looking at
> Amazon.com for anything and I found nothing. I did discover several of
> the
> websites that support RR. They are loaded with goodies and quite
> helpful.
I have heard timing reports from which I have inferred that there are
timing utilities. I have not used them.
I do something like this, though:
put the long seconds into junk
put the long seconds into startTime
put the long seconds into endTime
put endTime-startTime into timingOffset
...
put the long seconds into startTime
-- do stuff to be timed here
put the long seconds into endTime
put (endTime-startTime)-timingOffset
This can handle some short times, but the OS can increase the times, so
throw out outliers.
If what you are doing takes a long time, then you don't need at that
timingOffset stuff.
(The junk thing is superstition and is probably not needed.)
Dar Scott
More information about the use-livecode
mailing list