带有开始停止按钮的定时器,以毫秒为单位,按时间记录计算 [英] Timer with Start Stop Button in Milliseconds that does calculation with Time recorded

查看:99
本文介绍了带有开始停止按钮的定时器,以毫秒为单位,按时间记录计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我希望在VB Express中创建一个程序来执行以下操作:1。请求编号。示例说90.1545254556到10个deciamal places

2.然后使用停止启动按钮以毫秒为单位采用示例如果可能,请说4.3457633456到10个小数位。

3.自动编程给你答案我希望它这样做(输入数字)90.1545254556 *(时间)4.3457633456 = 391.790232164单位 - 保持此答案在屏幕上显示的某处。

4.然后按照上面的顺序并分离到上面的序列,程序要求你输入两个时序数字,第一个时间读取从,例如.9000000(秒),第二个时间读数为To 例如1.100000(秒)

5.然后在此之后出现另一个停止开始按钮(只有一个开始/停止按钮)。单击开始然后停止它测量时间并以毫秒为单位显示时间,如果它在上述示例时间.9000000到1.100000之间,或者在单击停止后这两次之间输入的任何内容之间,它将显示Ready并且不再进一步时序。如果时间超过1.100000秒,那么它将无法触及并停止然后返回到第2点。

6.假设您单击开始然后停止并且计时器显示.8000000秒它还没有在范围内我希望在第一个时间点击停止后立即重新开始停止启动按钮。我希望它能够多次执行此操作,如果它超过1.100000,则进入正确的.9000000到1.1000000范围,然后我希望它超出范围并停止。

7.然后在它完成之后我想让它说重新开始然后回到第2点,保持原始数字90.1545254556在开始时被激活然后再次以另一个时间开始从第2点可能与4.3457633456不同。



感谢您的帮助,来自Paul

I am looking to create a program in VB Express that does the following: 1. Asks for a number. Example say 90.1545254556 to 10 deciamal places
2. Then Takes a timing in Milliseconds using a stop start button Example Say 4.3457633456 to 10 decimal places if possible.
3. Program Automatically gives you the answer I want it to do this (number entered) 90.1545254556 * (timing) 4.3457633456 = 391.790232164 Units - Keep this answer somewhere displayed on screen.
4. Then after the above sequences and seperate to the above sequence the program asks you to enter two timing figures the first timing reads "from" for example .9000000 (Seconds) the second timing reads "To" for example 1.100000 (seconds)
5. Then another stop start button appears after this (just one start/stop button). When you click start and then stop it measures the time and displays the time in Millieseconds and if it is between the above example timing of .9000000 to 1.100000 or whatever you entered between those two times after clicking stop it will display Ready and take no further timings. If the timings go above 1.100000 seconds then it will "out of reach" and stop and then go back to point 2.
6. Say you click start and then stop and the timer displays .8000000 seconds it is not yet in range I want the stop start button to immediately start again as soon as you click stop on the first timing. I want it to do this as many times as it takes to get into the correct range of .9000000 to 1.1000000 if it goes above 1.100000 then I want it to say out of range and stop.
7. Then after it has done this I want it to Say "start again" and go back to Point 2 keeping the original figure of 90.1545254556 that was enetered at the begiining and then start again with another timing from point 2 which might be different to 4.3457633456.

Thanks for your help, From Paul

推荐答案

你的第一个问题是它无法正常工作:没有PC有一个计时器可以达到十位有效数字 - 甚至不接近那个。

你的第二个是Windows不是实时操作系统,因此在用户做某事并将其指示给代码之间存在巨大(且可变)的延迟 - 并且您无法改变它,这是Windows工作方式的基本部分。



话虽如此,请查看秒表类 [ ^ ] - 它提供了您需要的功能,如果不是分辨率。
Your first problem is that it isn't going to work: no PC has a timer which works to ten significant digits of a second - not even close to that.
Your second is the Windows is not a real time operating system, so there is a huge (and variable) delay between the user doing something and it being indicated to the code - and you can't change that, it's a fundamental part of how windows works.

Having said that, look at the Stopwatch class[^] - it provides the features you need, if not the resolution.


它可以是任何语言,也可以是mac或windows上的两个小数位。请有人帮助我。我

谢谢
It can be in any language and to two decimal places on a mac or windows. Please can someone help me. I
Thanks


这篇关于带有开始停止按钮的定时器,以毫秒为单位,按时间记录计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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