Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!nprdc!trejo From: trejo@nprdc.arpa (Leonard J. Trejo) Newsgroups: comp.lang.c Subject: PRECISE TIMING ON IBM PC/AT COMPATIBLE Message-ID: <2924@arctic.nprdc.arpa> Date: 20 Jul 89 21:39:07 GMT Sender: news@nprdc.arpa Reply-To: trejo@nprdc.arpa (Leonard J. Trejo) Distribution: usa Organization: Navy Personnel R & D Center Lines: 21 Say, we're trying to measure human reaction times (<1ms) by timing the interval between a video field and a keypress (on the keyboard) on our PC-compatible (Compaq 386/25) using the C subroutine call "ftime()", which purports to provide millisecond accuracy (MSC 5.1). Some net-news discussions I've followed say that the precision of ftime() may actually be _worse_ than 1 ms (say 8 ms), even though the time returned is measured in ms. So, I thought I'd ask to see how others accurately measure intervals on PC's. Would you be kind enough to send me a short description of how you do it and/or some example programs? L. J. T. ============================================================================ ARPANET : trejo@nprdc.navy.mil UUCP: ucsd!nprdc!trejo U.S. Mail: Leonard J. Trejo, Ph. D. Phone: (619) 553-7711 Neuroscience Laboratory (AV) 553-7711 NPRDC, Code 141 San Diego, CA 92152-6800