Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / Problem with QTimer

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Problem with QTimer
#969
Posted by: cajino 2003-05-28 05:44:29
I'm trying to make a program to measure time quite accurately (it's a chronometer for byke racing).
I noticed that setting the interval at 10 my chronometer fails by several seconds per minute, while setting it at 100 thing go a little better, but even with an interval of 1000 I get a 2 soc/min error!
I tried with VB6 and had the same problem.
Now, has my computer gone nuts or is this a common problem?(it's an AMD 1.7G 512 Mb).
Thank you all

Cajino
Message2. Re: Problem with QTimer
#970
Posted by: guidance 2003-05-28 07:13:22
I suppose QTimer implemented in Windows is still using native basic timer, i.e. 18.2Hz, i.e. 55mS resolution. I suggest don't rely on this as a real world stop-watch, you can read machine clock / timestamp in ontimer event handler, rather than accumulate the qtimer ticks itself. Here's a high resolution timestamp: http://g.yi.org/?f=1242#1382
Message3. Re: Problem with QTimer
#971
Posted by: cajino 2003-05-30 14:29:10
Exactly what I needed, thanks Guidance.

Cajino
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥287.00 ·
 
 
¥2,600.00 ·
 
 
¥289.00 ·
 
 
¥1,370.00 ·
 
 
¥289.00 ·
 
 
¥1,480.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0