Not sure about Linux, but on Windows TTimer should use WM_TIMER, that is window message and therefore no any other message can be processed, including new WM_TIMER, till this one won't end. But this is true, only if you don't call Application.ProcessMessages inside OnTimer.
Timer create proc for Windows. It uses standard
SetTimer API.
function TWin32WidgetSet.CreateTimer(Interval: integer; TimerFunc: TWSTimerProc) : THandle;
var
TimerInfo: PWin32TimerInfo;
begin
Result := 0;
if (Interval > 0) and (TimerFunc <> nil) then begin
New(TimerInfo);
TimerInfo^.TimerFunc := TimerFunc;
TimerInfo^.TimerID := Win32Extra.SetTimer(0, 0, Interval, @TimerCallBackProc);
if TimerInfo^.TimerID=0 then
dispose(TimerInfo)
else begin
FTimerData.Add(TimerInfo);
Result := TimerInfo^.TimerID;
end;
end;
end;
If you specify a window handle in the call to SetTimer, the application associates the timer with that window. Whenever the time-out value for the timer elapses, the system posts a WM_TIMER message to the window associated with the timer. If no window handle is specified in the call to SetTimer, the application that created the timer must monitor its message queue for WM_TIMER messages and dispatch them to the appropriate window. If you specify a TimerProc callback function, the default window procedure calls the callback function when it processes WM_TIMER. Therefore, you need to dispatch messages in the calling thread, even when you use TimerProc instead of processing WM_TIMER.
P.S. My own experience of game development shows, that trying to do everything in continuous and asynchronous fashion via using timers - is really bad idea. This complicates whole process a lot and causes lots of problems with synchronization and game logic. Approach, all real games and applications use - using so called frames, i.e. fixed quanta of time. In most cases internal game frames are synchronized with monitor update frequency, cuz it's better to flip video memory pages during retrace, so both logical and visual frames become essentially the same thing. If it isn't possible - frame skip can always be performed.