When I set the TTimer
interval to 1
, does it in reality execute the code every 1 millisecond or is it like every 20 milliseconds or something?
I am asking this question because I know that the Windows API Sleep()
function is not accurate, so I want to know if it is the same for TTimer
.
The standard VCL TTimer component is a wrapper for the Windows API timer functions SetTimer and KillTimer. TTimer simplifies the processing of the WM_TIMER messages by converting them into OnTimer events. A timer based on WM_TIMER message processing cannot provide a resolution better than 10 milliseconds.
Source: Sergworks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With