Click here to Skip to main content
15,878,945 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have a winform system showing photos, the system measure the elapsed time between showing the photo until the user pressed any key button on the keyboard with a stopwatch.

I saved the time in a
C#
Dictionary<image, long>
in such a way that for each photo i have the response time(saved in miliseconds) from the user.

How do i verify that the times that the user pressed is the real times saved in the dictionary?

Is there any tool in VS2012 or other, to help me Verify it?

Thanks.
Posted
Comments
Kenneth Haugland 18-Apr-13 4:00am    
Depends on how accurqate you need the timer to be. If you want millisecound accuracy I think youll have to resolve the issue with external hardware.
RoyDoron 18-Apr-13 4:02am    
I just want to know if the times saved are in the normal interval..
I'm taking under consideration other apps on the cpu.

I dont want to use external hardware, just vs tools or other programs.. is there any?

Most accurate method to time interval between event using the same computer is the class System.Diagnostics.Stopwatch:
http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx[^].

Pay attention for the static fields IsHighResolution and Frequency, to see what resolution do you really have. Normally, on a Windows platform, it is very good.

—SA
 
Share this answer
 
Comments
Espen Harlinn 25-May-13 20:25pm    
5'ed!
Sergey Alexandrovich Kryukov 25-May-13 20:39pm    
Thank you, Espen.
—SA
It takes about 20 ms before the brain can start processing the picture, and then it has to make a desicion, before telling the hand to press a key.

Unless your program tries to quantify Nerve conduction velocity[^] - a regular PC should do well enough under a normal load.


Best regards
Espen Harlinn
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 11-Jun-13 19:47pm    
Great point, a 5.
—SA
Espen Harlinn 12-Jun-13 15:45pm    
Thank you, Sergey :-D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900