Xref: utzoo comp.sys.mac.hypercard:1328 comp.sys.mac.programmer:3436
Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ncar!ames!pasteur!tehran.berkeley.edu!korn
From: korn@tehran.berkeley.edu (Peter "Arrgh" Korn)
Newsgroups: comp.sys.mac.hypercard,comp.sys.mac.programmer
Subject: Re: Reaction Time stacks : can I do this?
Message-ID: <8068@pasteur.Berkeley.EDU>
Date: 7 Dec 88 01:34:31 GMT
References: <6012@mva.cs.liv.ac.uk> <21792@apple.Apple.COM>
Sender: news@pasteur.Berkeley.EDU
Organization: What, me organized???
Lines: 22

In <21792@apple.Apple.COM>, dan@Apple.COM (Dan Allen) said:  
>In article <6012@mva.cs.liv.ac.uk> phil@mva.cs.liv.ac.uk writes:
>>1) is it possible to write an XCMD/XFCN to await a keypress and to time
>>more accurately than 1/60th of a second, and return this info to a script.
>
>Yes, an XCMD can measure event timing to finer intervals.  You would
>need to write some tricky code to use one of the VIA internal
>millisecond timers.

Alternately instead of writing tricky assembly code that would do nasty,
CPU depending things like talk to hardware, you could use the Time Manager
calls (Inside Mac vol IV pp 299-301) to get 1 millisecond accuracy.  If I'm
not mistaken, this requires that your machine be running version 4.2 or
later of the System, but since that's needed for Hypercard anyway, that 
shouldn't be a problem.


Peter
--
Peter "Arrgh" Korn
korn@ucbvax.Berkeley.EDU
{decvax,hplabs,sdcsvax,ulysses,usenix}!ucbvax!korn