Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: WinForm
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 22:58pm
Kenneth Haugland at 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 at 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 at 25-May-13 20:25pm
Sergey Alexandrovich Kryukov at 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 at 11-Jun-13 19:47pm
Great point, a 5.
Espen Harlinn at 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
0 OriginalGriff 645
1 Maciej Los 225
2 Abhinav S 171
3 Richard Deeming 160
4 Suvendu Shekhar Giri 159
0 Sergey Alexandrovich Kryukov 9,623
1 OriginalGriff 9,095
2 Peter Leow 5,044
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 2,581

Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2015
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