How accurate is TTimer?

When I set the interval TTimerto 1, does it really execute code every 1 millisecond or is it like every 20 milliseconds or something like that?

I ask this question because I know that the Windows API function is Sleep()inaccurate, so I want to know if it is the same for TTimer.

+4
source share
1 answer

The standard VCL TTimer component is a wrapper for the Windows API timer functions SetTimer and KillTimer. TTimer simplifies the processing of WM_TIMER messages by converting them to OnTimer events. A timer based on WM_TIMER message processing cannot provide a resolution of more than 10 milliseconds.

Source: Sergworks

+7
source

All Articles