Главная страница | назад





Article #16283: TTimer not firing at correct interval

 Question and Answer Database

FAQ1283D.txt   TTimer not firing at correct interval
Category   :VCL
Platform    :All
Product    :All 32 bit  

Question:
When I create the TTimer component, it does not fire at the 
correct specified time. How can I get more accurate results?

Answer:
Windows timer event were not designed to accommodate 
hi-resolution timing. In other words, while you may set the 
timer to fire every 1000 milliseconds, it may fire sometimes 
at intervals longer than 1000 milliseconds. Values below 55 
milliseconds will never fire on time under Windows, since this 
is the Timer components minimum resolution. You can get the 
time during the timer event and compare it to the last time 
the event fired to receive a better timing resolution.


7/16/98 4:31:28 PM
 

Last Modified: 01-SEP-99