Q: Is the time stamp for an morphic event set by OS?

Dan Ingalls Dan.Ingalls at disney.com
Wed May 2 14:45:44 UTC 2001


>on 5/2/01 1:56 AM, Raymond Tiefenthal at r.tiefenthal at gmx.de wrote:
>> problem: I have a working program, sort of a chronometric program, where you
>> have to respond to a random stimulus as quickly as possible. Now I'm worried
>> the reaction time results may not be accurate enough. Typically, respond
>> times are 200ms +/- 30 using mouse buttons. The respond time is meassured
>> like this:
>[...]
>> question: The issue isn't when the click event gets through to the morph
>> clicked on, but when the timeStamp is set. My notion is, the OS sets the
>> time stamp for the event, then it gets polled sometime from
>> EventSensor>>primGetNextEvent:. If thats the way it works, the timeStamp
>> would be accurate enough, I guess. The resolution for my app ought to be
>> less than 2ms.
>[...]

Mark van Gulik <ghoul6 at home.net> replied...
>It's not going to happen.  Unless you collect a *HUGE* number of samples,
>the resolution is going to be much worse.  There are two probable scenarios:
>[...]

On Macs, I believe mouse events are polled by the hardware every 16ms, and this will limit your resolution as Mark says.

You might want to look into high end tablets with custom drivers.  The old serial drivers used to give considerably better than 60 points/sec -- I think more like 200 -- and this would imply something like a 5ms response to clicks.  I haven't looked into these since USB came along, and I don't know what the limitations are on Windows, but it's possible you can get better response in this way just by going to the store.

Hope this helps

	- Dan







More information about the Squeak-dev mailing list