500 ms to set a thumbpos??

J. Landman Gay jacque at hyperactivesw.com
Sun Apr 13 18:02:29 EDT 2014


Except we don't know how intensive the ck handler is.

On 4/13/14, 4:28 PM, Alex Tweedly wrote:
> It's good to get the computer to do any hard work for us, but we can
> still do some mental arithmetic ....
>
> 1026 - 542  gives just under 500ms, and should be accurate.
>
> In fact, you could (if you were in the mood) argue that this method is
> more accurate, since it doesn't carry an overhead for resetting strt :-)
>
> -- Alex.
>
> On 13/04/2014 19:58, J. Landman Gay wrote:
>> On 4/13/14, 11:42 AM, Dr. Hawkins wrote:
>>> While looking for the holdup in some code,
>>>
>>>     put the milliseconds -strt into stp[4]
>>>     set the thumbpos of sb "dnaScroll" to chrPos
>>>     put the milliseconds -strt into stp[5]
>>>     ck "elapsed: " && stp[0] && stp[0] && stp[1] && stp[2] && stp[3] &&
>>> stp[4] &&stp[5]
>>>
>>> The output is
>>>      elapsed:  0 0 38 38 38 542 1026
>>>
>>> That's 500 ms, repeatable, for that single line of code setting a
>>> thumbpos.
>>
>> The handler is counting cumulative milliseconds; step 5 is counting
>> everything that executed in steps 1 through 5, including the logging
>> statement. You'll get a more accurate time if you reinitialize strt to
>> zero before setting each thumbpos.
>>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list