Click here to Skip to main content
12,999,417 members (83,835 online)
Rate this:
Please Sign up or sign in to vote.
See more: (untagged)

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
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?

Posted 17-Apr-13 21:58pm
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?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Most accurate method to time interval between event using the same computer is the class System.Diagnostics.Stopwatch:[^].

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.

Espen Harlinn 25-May-13 20:25pm
Sergey Alexandrovich Kryukov 25-May-13 20:39pm
Thank you, Espen.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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
Sergey Alexandrovich Kryukov 11-Jun-13 19:47pm
Great point, a 5.
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100