|
-
March 12th, 1999, 02:18 PM
#1
measure acuracy 1/1000 sec from fixpoint to keystroke
Hi
i need a routine that measure the time from a fixpoint
to the hit a key on the keyboard with accuracy of 1/1000 second.
I work with macromedia.Do u know an xtra that do the job?
Or are u able to do the job in MS-Visualbasic or MS-Visual c++
or in kind of an dll what ever? Please peply.
Thomas
-
March 15th, 1999, 04:24 AM
#2
Re: measure acuracy 1/1000 sec from fixpoint to keystroke
Hi
You might want to check out the High Performance Timer Objects from the CCRP team.
Take a look at http://www.mvps.org/ccrp
Regards
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com/vb
-
July 21st, 1999, 05:52 PM
#3
Re: measure acuracy 1/1000 sec from fixpoint to keystroke
The best way I have found is by using the QueryPerformanceFrequency and QueryPerformanceCounter API Calls. They access very low-level timers which give readings in the microsecond range. They take 8-byte integers, so pass a Currency. Example, how long a process takes:
Dim cFreq as Currency, cT1 as Currency, cT2 as Currency
QueryPerformanceFrequency cFreq ' need to get this only once
..
QueryPerformanceCounter cT1 ' get timestamp
..do something
QueryPerformanceCounter cT2 ' get 2nd timestamp
Label1 = format$((cT2-cT1)/Freq, "#.######") ' display in seconds
I use these all the time and they're the best I've found.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|