About the milliseconds function

Dar Scott dsc at swcp.com
Wed Apr 10 14:48:01 EDT 2002


On Wednesday, April 10, 2002, at 11:04 AM, Beruvin wrote:

> I wonder if the 'milliseconds' function would be a good and 
> 'serious' measure for a RT (reaction time !) ?

I have used the milliseconds function a little for timing.  The 
resolution will vary depending mostly on the OS.  I get ms 
resolution on my OS X and Mac OS 9 (compatibility mode) on my 
Blue & White G3.

Your greater problem is accuracy in estimating variations in time 
between noting the ms and creating the stimulus and between the 
actually key press and noting the time in the handler for the key 
press (or mouse down or whatever).  The modern OS is doing all 
kinds of things that can cause variations in these times.  Design 
your experiment accordingly.
Do not refer to any controls other than the stimulus within the 
timing period.

Always call milliseconds() in the handler of the stimulus and in 
the handler of the response.  Avoid calling milliseconds() in 
functions and called handlers.  (There is also something weird 
about the latter and milliseconds() and I haven't figured it out 
yet.)

Any measure can be a 'serious' measure depending on your experiment 
goals and experiment design.  Just keep yourself honest in 
estimating error factors.

You might be able to come up with a demo that can run on multiple 
platforms, but for the actual experiment itself, I'd choose the 
fastest computer around and target it.

(For me, because of observed weird behavior, I'd test everything 
the best I can.)

Dar Scott





More information about the use-livecode mailing list