Board index » delphi » TTimer-Component works correct?

TTimer-Component works correct?

Hi

is it normal that the TTimer-Component does ignore <interval>-inputs less
10? If i input such values less 10 it's acting so as i would have typed
exaktly 10. But i need 1000 calls per minute! What can i do?

Thx

still beginner

 

Re:TTimer-Component works correct?


Quote
> Hi

Greetings!

Quote
> is it normal that the TTimer-Component does ignore <interval>-inputs less
> 10?

Only on NT based operating systems.

Quote
> If i input such values less 10 it's acting so as i would have typed
> exaktly 10. But i need 1000 calls per minute! What can i do?

As Nick stated, you will have to use something else.

The granularity of TTimer is based on a hardware timer.  On 9x operating
systems the timer interrupt occurs approximately every 55ms.  On NT
operating systems the timer interrupt occurs every 10ms.

As if that isn't enough to cause you problems, TTimer is triggered from a
message placed in your application's message queue.  This means that your
application may or may not be awakened right away.  In addition, if your
application stops processing messages (e.g. hold down the maximize button)
the TTimer.OnTimer event will not occur.

Hope that helps, Brian

Re:TTimer-Component works correct?


On Sat, 1 Feb 2003 03:14:18 +0100, "KV" <klaus_v...@hotmail.com>
wrote:

Quote
>is it normal that the TTimer-Component does ignore <interval>-inputs less
>10?

TTimer uses a Windows timer, which is a relatively low resolution
timer. It's also not very accurate.

You could use a high resolution timer by calling
QueryPerformanceCounter. Get the timer's frequency by calling
QueryPerformanceFrequency.

---
Yorai Aminov (TeamB)
http://develop.shorterpath.com/yorai
(TeamB cannot answer questions received via email.)

Other Threads