如何测量键盘的响应时间? [英] How to measure the response time from the keyboard?

查看:897
本文介绍了如何测量键盘的响应时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我有一个winform系统显示照片,系统测量显示照片之间经过的时间,直到用户按下键盘上的任何键按钮为止一个秒表。



我用这样的方式将时间保存在

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

Dictionary<image, long>

中对于每张照片,我都有来自用户的响应时间(以毫秒为单位)。



如何验证用户按下的时间是实际节省的时间在字典里?



VS2012或其他工具有什么工具可以帮我验证吗?



谢谢。

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.

推荐答案

使用同一台计算机的事件之间的时间间隔最精确的方法是类 System.Diagnostics.Stopwatch

http://msdn.microsoft。 com / en-us / library / system.diagnostics.stopwatch.aspx [ ^ ]。



注意静态字段 IsHighResolution 频率,看看做什么分辨率你真的有。通常,在Windows平台上,它非常好。



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


需要在大脑开始处理图片之前大约20毫秒,然后它必须做出决定,然后告诉手按一个键。



除非您的程序尝试量化神经传导速度 [ ^ ] - 普通PC应该在正常负载下运行良好。





最好的问候

Espen Harlinn
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


这篇关于如何测量键盘的响应时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆